Hojo: An ORM built on top of SQL Alchemy
Project description
Hojo - An Opinionated ORM on Top of SQL Alchemy
Hojo is a library that simplifies the usage of SQL Alchemy, providing an interface that is familiar to Django users. While it is not an exact replication of the Django ORM API, it strives to be reminiscent of it, making it easier for Django developers to work with SQL Alchemy.
Please note that this library is currently in Alpha version and is not yet ready for production use.
Installation
You can install Hojo using pip:
pip install hojo
Basic Usage
Here's a basic example of how to use Hojo:
from hojo import BaseModel, dataclass
@dataclass
class Soldier(BaseModel):
name: str
weapon: str
# Create a Soldier instance
hero = Soldier(name='Cloud', weapon='Buster Sword')
# Insert the hero into the 'soldiers' table
Soldier.objects.create(hero)
# Retrieve a Soldier with the name 'Cloud' from the 'soldiers' table
cloud = Soldier.objects.filter(name='Cloud')
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
hojo-0.1.0.tar.gz
(7.3 kB
view details)
Built Distribution
hojo-0.1.0-py3-none-any.whl
(8.4 kB
view details)
File details
Details for the file hojo-0.1.0.tar.gz
.
File metadata
- Download URL: hojo-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.13 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e284aa9c36910c942497192d95ad56d0d0dba0ff88545479ca30ef8ecb7ded42 |
|
MD5 | 695ea2af933890d7f88c4830d0c53be9 |
|
BLAKE2b-256 | be8200c3e8e334e2cf33b11a192284a9ca5dfb9f3a21d88a9a65008bbd3ecad0 |
File details
Details for the file hojo-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: hojo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.13 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aac81802efe6de5a106645cf867821616a184af67a3c028a90c4572da0f69379 |
|
MD5 | b4e25af8973572a13fc60489ad206fec |
|
BLAKE2b-256 | f58fd9422e55e5d59b3a499bf7c00b5a76289f72641a5be80e7cb904a6b05091 |