CLI for services template for Python (FastAPI, SQLAlchemy, Alembic)
Project description
Skeletone
A minimal, well-structured Python project skeleton and micro-framework for rapid backend development.
Built on top of FastAPI, SQLAlchemy, and Alembic with automated template versioning and logging.
Features
- ๐ FastAPI foundation with modern Python async practices
- ๐๏ธ SQLAlchemy (async) ORM with Alembic migrations
- ๐งฉ Minimal framework structure with clear folder layout
- ๐ฆ Template management: init, upgrade, downgrade, version lock
- ๐ Patch-based updates between template versions
- ๐ Incremental version tracking via
skeletone.lock - ๐ Request logging: Incoming API requests are logged to a database
- ๐งพ Custom logging module for easy integration and extension
- โก Quick setup - get started in seconds
Installation
pip install skeletone
Quick Start
1. Initialize a New Project
mkdir my-awesome-api && cd my-awesome-api
skeletone init
2. Check Available Versions
skeletone versions
3. Upgrade Your Project
skeletone upgrade
4. Rollback if Needed
# Interactive version selection
skeletone downgrade
# Or specify version directly
skeletone downgrade -v v1.2.0
CLI Commands
| Command | Description |
|---|---|
skeletone init |
Initialize new project from latest template |
skeletone upgrade |
Upgrade to latest template version |
skeletone downgrade |
Downgrade to a previous template version |
skeletone versions |
List all available template versions |
skeletone help |
Show detailed help and usage examples |
How It Works
Skeletone is built around a patch-based versioning system:
- Init: Sets up a fresh project from the latest template
- Upgrade: Applies sequential
.patchdiffs to upgrade your project - Downgrade: Applies reverse patches to safely revert
- Track: Saves current version to
skeletone.lock
Template Highlights
The generated project includes:
your-project/
โโโ app/
โ โโโ models/ # SQLAlchemy models (async)
โ โโโ routes/ # FastAPI route handlers
โ โโโ dependencies/ # DI system
โ โโโ logging/ # Logging logic
โโโ alembic/ # Database migrations
โโโ config.py # App settings
โโโ main.py # FastAPI application entrypoint
โโโ requirements.txt # Dependencies
โโโ skeletone.lock # Template version lock file
Logging System
Skeletone includes:
- ๐ฅ Request logger: Automatically logs all incoming HTTP requests (path, method, status, timestamp)
- ๐งพ Logging module: Easily extendable and stored logs in the database
- ๐ Useful for debugging, monitoring, and auditing
All logging is asynchronous, just like the rest of the application.
Example Workflow
# Create and initialize a new project
mkdir blog-api && cd blog-api
skeletone init
# Do your development work...
# Upgrade to latest version
skeletone upgrade
# Check available versions
skeletone versions
# Rollback if needed
skeletone downgrade -v v1.1.0
Version Table Example
Available Skeletone Versions
โโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ Version โ Status โ
โโโโโโโโโโโผโโโโโโโโโโโโโโค
โ v1.3.0 โ โ
Current โ
โ v1.2.0 โ โ
โ v1.1.0 โ โ
โโโโโโโโโโโดโโโโโโโโโโโโโโ
Best Practices
- Always commit your code before upgrade/downgrade
- Review diffs and changes after updating
- Thoroughly test after version transitions
- Track your modifications to avoid patch conflicts
Template Repository
The base template for Skeletone lives here:
๐ https://github.com/yoursteacup/skeletone
Contributing
Contributions are welcome! Please see the GitHub repo for guidelines and issue tracking.
Author
Developer: Zhaxybayev Daulet
GitHub: yoursteacup
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skeletone-0.1.14.tar.gz.
File metadata
- Download URL: skeletone-0.1.14.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0db98d8bbae677e5106fc0f7581808530e3f5a0f613a5a8ad2ee7ebbf7777c5
|
|
| MD5 |
18f72a214ac7ee407b0daad0fa84fe19
|
|
| BLAKE2b-256 |
3065f80e2b6cdbe1d9eece9509c027b7dd6cf1574f8a3527e941230a5ee443a9
|
File details
Details for the file skeletone-0.1.14-py3-none-any.whl.
File metadata
- Download URL: skeletone-0.1.14-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fb1e4588fb5f8bd930a78a62b99cdd6cce4a90b0cae9a42affe2d10eb7b53eb
|
|
| MD5 |
4ad767b212c26784cb0167c5414d8f02
|
|
| BLAKE2b-256 |
e2adbcf68b8e643922717bfd78df7837f33b3764403319b085c7d790bfea7eef
|