Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SUThing
# SUThing <img src="docs/assets/favicon.ico" alt="suthing logo" style="height: 32px; width:32px;"/>

SUThing /ˈsu.θɪŋ/ or /ˈsʌ.θɪŋ/ (Some Useful Things) is a collection of useful classes and decorators.

Expand All @@ -17,6 +17,9 @@ A Python utility package providing tools for file handling, timing, profiling, a
- **Data Comparison**: Deep comparison of nested data structures
- **Error Handling**: Decorators for secure function execution and error tracking

## Documentation
Full documentation is available at: [growgraph.github.io/suthing](https://growgraph.github.io/suthing)

## Installation

```bash
Expand Down
9 changes: 4 additions & 5 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ Load and manage configuration files with automatic format detection:

```python
from suthing import FileHandle
from pathlib import Path

# Load configuration from different formats
config = FileHandle.load("config.yaml")
env_vars = FileHandle.load(".env")
credentials = FileHandle.load("secrets.json")
df = FileHandle.load("secrets.csv")

# Save configuration with compression
FileHandle.dump(config, "config.json.gz")
Expand Down Expand Up @@ -55,17 +54,17 @@ Create and manage database connections with automatic type detection:
from suthing.connection import ConfigFactory

# ArangoDB connection
arango_config = ConfigFactory.create_config(url="http://localhost:8529")
arango_config = ConfigFactory.create_config("http://localhost:8529")

# Neo4j connection
neo4j_config = ConfigFactory.create_config(dict_like={
neo4j_config = ConfigFactory.create_config({
"port": "7474",
"username": "neo4j",
"password": "password"
})

# WSGI application
wsgi_config = ConfigFactory.create_config(dict_like={
wsgi_config = ConfigFactory.create_config({
"port": "8000",
"host": "0.0.0.0",
"path": "/api"
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ A Python utility package providing tools for file handling, timing, profiling, a

## Features

- **File Handling**: one-line file reading/writing with file format inference from provided extension (YAML, JSON, CSV, pickle, gz etc.)
- **File Handling**: One-line file reading/writing with file format inference from provided extension (YAML, JSON, CSV, pickle, gz etc.)
- **API/Database Config Class**: Normalized representation of API connection configs
- **Performance Measurement**: Simple timer utilities and profiling decorators
- **Data Comparison**: Deep comparison of nested data structures
- **Error Handling**: Decorators for secure function execution and error tracking

## Quick Start

```python
from suthing import FileHandle, Timer, profile, equals
from suthing import FileHandle, Timer, equals

# Read a file
data = FileHandle.load("config.yaml")
Expand All @@ -41,7 +42,6 @@ result = equals(dict1, dict2)
Explore the documentation to learn more about Suthing's features:

- [Getting Started](getting_started/quickstart.md) - Learn how to install and use Suthing
<!-- - [Features](features/) - Detailed documentation of all features -->
- [API Reference](reference/index.md) - Complete API documentation
- [Examples](examples.md) - Code examples and usage patterns

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dev = [
"setuptools>=80.1.0"
]
docs = [
"mkdocs-material>=9.6.12",
"mkdocs-material",
"mkdocs>=1.6.1",
"mkdocstrings[python]>=0.29.1"
]
Expand Down