Skip to main content

Hermes ORM

Latest Version GitHub stars GitHub forks GitHub license

Hermes ORM is a modern Python ORM designed for simplicity, flexibility, and performance. With support for relational mappings, migrations, and advanced querying, Hermes ORM is tailored for developers who need a powerful yet intuitive tool for managing database operations in their applications.


🚀 Key Features

  • Dynamic Model Mapping: Automatically map Python classes to database tables with field validation and relational support.
  • Advanced Query Builder: Intuitive querying with dynamic SELECT, INSERT, UPDATE, and DELETE statements.
  • Rich Relationships: Support for One-to-One, One-to-Many, Many-to-Many, and polymorphic Morph relationships.
  • Migrations Manager: Create, apply, and rollback migrations seamlessly.
  • Asynchronous & Synchronous Database Operations: Flexible execution modes to match your application’s needs.
  • Caching Mechanisms: Built-in query caching for optimized performance.
  • Debugging & Logging: Configurable debug and logging options for streamlined troubleshooting.
  • Open for Personal & Commercial Use: Use Hermes ORM freely in personal and commercial projects (not for resale as a standalone product).

🛠️ Getting Started

Step 1: Install Hermes ORM

Install Hermes ORM via pip:

pip install hermes-orm

Step 2: Define Your Models

Define models that represent your database structure:

from hermes.model import BaseModel
from hermes.fields import IntegerField, StringField, ForeignKeyField

class User(BaseModel):
    id = IntegerField(primary_key=True)
    name = StringField(max_length=255, nullable=False)

class Post(BaseModel):
    id = IntegerField(primary_key=True)
    user_id = ForeignKeyField("User", nullable=False)
    content = StringField(nullable=False)

Step 3: Run Migrations

Use the CLI to generate and apply migrations:

hermes make_migration create_users_table create
hermes migrate

Step 4: Query the Database

Perform operations on your models:

# Create a user
user = User(name="Alice")
user.save(db_connection)

# Fetch all posts
posts = Post.all(db_connection)

# Add a post for a user
post = Post(user_id=user.id, content="Hello, Hermes!")
post.save(db_connection)

🧩 Supported Relationships

  • One-to-One: Easily map one-to-one relationships with OneToOne fields.
  • One-to-Many: Establish hierarchical relationships with OneToMany.
  • Many-to-Many: Simplify complex mappings with ManyToMany pivot tables.
  • Polymorphic: Use MorphOne and MorphMany for flexible, type-based relations.

Each relationship is implemented with robust utilities for querying and manipulation.


📦 Latest Version

  • Version: 0.1.2
  • Release Date: November 28, 2024

🔍 Project Status

Closed Issues Enhancement Issues Bug Issues

Hermes ORM is under active development, with new features and improvements added regularly. Contributions and feedback are welcome!


📜 License and Usage

Hermes ORM is free to use for both personal and commercial projects. However, Hermes ORM itself cannot be resold or distributed as a standalone product.


🤝 Contributors

Developed and maintained by Altxria Inc. with contributions from a growing community of developers.

Contributors

See All Contributors


❤️ Support Hermes ORM

If you find Hermes ORM useful, consider supporting its development and ongoing maintenance:

Sponsor Hermes ORM

Metadata

Release files for hermes-orm 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hermes-orm 0.1.7
File Size Uploaded
hermes_orm-0.1.7.tar.gz 22.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hermes-orm 0.1.7
File Interpreter ABI Platform
hermes_orm-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 48.8 kB

Release files / hermes_orm-0.1.7.tar.gz

Download URL hermes_orm-0.1.7.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ccd4f0c8793470e077ba2b3fc4a5a783dc8d6c506a85e1b7b9699aa7d59a2011
BLAKE2b-256 checksum
How to use checksums
78d82c169a35bfd9613f04386f47c232cd6231d390f4bce24fb0f0c7385f8a3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.8

Release files / hermes_orm-0.1.7-py3-none-any.whl

Download URL hermes_orm-0.1.7-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a42d6230cb7b677a0fcfd1cb171f1fc374cb8343c8e3aed11d17618b582acd2
BLAKE2b-256 checksum
How to use checksums
0a792449dba673cdc70d3e4389c10ecea2b85d8c90880a47e8f513e8814839f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page