Skip to main content

Universal, framework-independent ORM for Python.

Project description

Akron ORM Logo

Akron

Universal, framework-independent ORM for Python.


Getting Started

from pydantic import BaseModel

from akron import Akron
from akron.models import ModelMixin

class User(BaseModel, ModelMixin):
	id: int
	name: str
	age: int

db = Akron("sqlite:///test.db")
User.create_table(db)
User.insert(db, User(id=1, name="Alice", age=30))
users = User.find(db)
print(users)

Features Table

Feature Supported
Simple Syntax
Multi-DB Support
Multi-Table/FK
Auto Migrations
CLI
Typesafe Models
NoSQL (MongoDB)
Error Handling
Test Coverage

Database Support Matrix

Database CRUD FKs Migrations CLI Typesafe Models
SQLite
MySQL
PostgreSQL
MongoDB Schemaless

CLI Command Examples

akron makemigrations users --db sqlite:///test.db --schema '{"id": "int", "name": "str"}'
akron migrate users --db sqlite:///test.db
akron create-table users --db sqlite:///test.db --schema '{"id": "int", "name": "str"}'
akron drop-table users --db sqlite:///test.db
akron inspect-schema users --db sqlite:///test.db
akron seed users --db sqlite:///test.db --data '{"id": 1, "name": "Alice"}'
akron raw-sql --db sqlite:///test.db --sql "SELECT * FROM users"

Versioning & Changelog

  • Current version: v0.1.1
  • See CHANGELOG.md for updates.

PyPI Installation

pip install akron

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akron-0.1.4.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

akron-0.1.4-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file akron-0.1.4.tar.gz.

File metadata

  • Download URL: akron-0.1.4.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for akron-0.1.4.tar.gz
Algorithm Hash digest
SHA256 37c3ca27b0ad6a43b80fc5d442b13926764e7477ffcbd96b8a2ae15801cef0d6
MD5 9e58190e55483a57027b146f20fb1adf
BLAKE2b-256 e7cc7c9300c0f6ae446cbb1a96b455a70d899fdd239ff2ceff6c0e9908a4204f

See more details on using hashes here.

File details

Details for the file akron-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: akron-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for akron-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 936b234bd3d306eb009a2a32e1d21f1c8bf2d29e6c26c1056dc7e00ce4020e19
MD5 1a0f246653979449ea0e95d6f19106c5
BLAKE2b-256 a87a87c86fc7716b409eda8fe78cf9b9cdfceeceaba4ce0bc452ce26757d7ec3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page