# Hermes ORM
![Latest Version](https://img.shields.io/github/v/release/altxriainc/hermes)
![GitHub stars](https://img.shields.io/github/stars/altxriainc/hermes?style=social)
![GitHub forks](https://img.shields.io/github/forks/altxriainc/hermes?style=social)
![GitHub license](https://img.shields.io/github/license/altxriainc/hermes)
**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:
```bash
pip install hermes-orm
```
### Step 2: Define Your Models
Define models that represent your database structure:
```python
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:
```bash
hermes make_migration create_users_table create
hermes migrate
```
### Step 4: Query the Database
Perform operations on your models:
```python
# 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](https://img.shields.io/github/issues-closed/altxriainc/hermes)
![Enhancement Issues](https://img.shields.io/github/issues/altxriainc/hermes/enhancement)
![Bug Issues](https://img.shields.io/github/issues/altxriainc/hermes/bug)
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](https://contrib.rocks/image?repo=altxriainc/hermes)
[See All Contributors](https://github.com/altxriainc/hermes/graphs/contributors)
---
## ❤️ Support Hermes ORM
If you find Hermes ORM useful, consider supporting its development and ongoing maintenance:
[![Sponsor Hermes ORM](https://img.shields.io/badge/Sponsor-Hermes%20ORM-blue?logo=github-sponsors)](https://github.com/sponsors/altxriainc)
Raw data
{
"_id": null,
"home_page": "https://github.com/altxriainc/hermes",
"name": "hermes-orm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "ORM Python SQL migrations relations caching",
"author": "Altxria Inc.",
"author_email": "company@altxria.com",
"download_url": "https://files.pythonhosted.org/packages/78/d8/2c169a35bfd9613f04386f47c232cd6231d390f4bce24fb0f0c7385f8a3e/hermes_orm-0.1.7.tar.gz",
"platform": null,
"description": "\r\n# Hermes ORM\r\n\r\n![Latest Version](https://img.shields.io/github/v/release/altxriainc/hermes)\r\n![GitHub stars](https://img.shields.io/github/stars/altxriainc/hermes?style=social)\r\n![GitHub forks](https://img.shields.io/github/forks/altxriainc/hermes?style=social)\r\n![GitHub license](https://img.shields.io/github/license/altxriainc/hermes)\r\n\r\n**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.\r\n\r\n---\r\n\r\n## \ud83d\ude80 Key Features\r\n\r\n- **Dynamic Model Mapping**: Automatically map Python classes to database tables with field validation and relational support.\r\n- **Advanced Query Builder**: Intuitive querying with dynamic `SELECT`, `INSERT`, `UPDATE`, and `DELETE` statements.\r\n- **Rich Relationships**: Support for `One-to-One`, `One-to-Many`, `Many-to-Many`, and polymorphic `Morph` relationships.\r\n- **Migrations Manager**: Create, apply, and rollback migrations seamlessly.\r\n- **Asynchronous & Synchronous Database Operations**: Flexible execution modes to match your application\u2019s needs.\r\n- **Caching Mechanisms**: Built-in query caching for optimized performance.\r\n- **Debugging & Logging**: Configurable debug and logging options for streamlined troubleshooting.\r\n- **Open for Personal & Commercial Use**: Use Hermes ORM freely in personal and commercial projects (not for resale as a standalone product).\r\n\r\n---\r\n\r\n## \ud83d\udee0\ufe0f Getting Started\r\n\r\n### Step 1: Install Hermes ORM\r\n\r\nInstall Hermes ORM via pip:\r\n\r\n```bash\r\npip install hermes-orm\r\n```\r\n\r\n### Step 2: Define Your Models\r\n\r\nDefine models that represent your database structure:\r\n\r\n```python\r\nfrom hermes.model import BaseModel\r\nfrom hermes.fields import IntegerField, StringField, ForeignKeyField\r\n\r\nclass User(BaseModel):\r\n id = IntegerField(primary_key=True)\r\n name = StringField(max_length=255, nullable=False)\r\n\r\nclass Post(BaseModel):\r\n id = IntegerField(primary_key=True)\r\n user_id = ForeignKeyField(\"User\", nullable=False)\r\n content = StringField(nullable=False)\r\n```\r\n\r\n### Step 3: Run Migrations\r\n\r\nUse the CLI to generate and apply migrations:\r\n\r\n```bash\r\nhermes make_migration create_users_table create\r\nhermes migrate\r\n```\r\n\r\n### Step 4: Query the Database\r\n\r\nPerform operations on your models:\r\n\r\n```python\r\n# Create a user\r\nuser = User(name=\"Alice\")\r\nuser.save(db_connection)\r\n\r\n# Fetch all posts\r\nposts = Post.all(db_connection)\r\n\r\n# Add a post for a user\r\npost = Post(user_id=user.id, content=\"Hello, Hermes!\")\r\npost.save(db_connection)\r\n```\r\n\r\n---\r\n\r\n## \ud83e\udde9 Supported Relationships\r\n\r\n- **One-to-One**: Easily map one-to-one relationships with `OneToOne` fields.\r\n- **One-to-Many**: Establish hierarchical relationships with `OneToMany`.\r\n- **Many-to-Many**: Simplify complex mappings with `ManyToMany` pivot tables.\r\n- **Polymorphic**: Use `MorphOne` and `MorphMany` for flexible, type-based relations.\r\n\r\nEach relationship is implemented with robust utilities for querying and manipulation.\r\n\r\n---\r\n\r\n## \ud83d\udce6 Latest Version\r\n\r\n- **Version**: 0.1.2 \r\n- **Release Date**: November 28, 2024\r\n\r\n---\r\n\r\n## \ud83d\udd0d Project Status\r\n\r\n![Closed Issues](https://img.shields.io/github/issues-closed/altxriainc/hermes)\r\n![Enhancement Issues](https://img.shields.io/github/issues/altxriainc/hermes/enhancement)\r\n![Bug Issues](https://img.shields.io/github/issues/altxriainc/hermes/bug)\r\n\r\nHermes ORM is under active development, with new features and improvements added regularly. Contributions and feedback are welcome!\r\n\r\n---\r\n\r\n## \ud83d\udcdc License and Usage\r\n\r\nHermes ORM is free to use for both personal and commercial projects. However, Hermes ORM itself cannot be resold or distributed as a standalone product.\r\n\r\n---\r\n\r\n## \ud83e\udd1d Contributors\r\n\r\nDeveloped and maintained by **Altxria Inc.** with contributions from a growing community of developers.\r\n\r\n![Contributors](https://contrib.rocks/image?repo=altxriainc/hermes)\r\n\r\n[See All Contributors](https://github.com/altxriainc/hermes/graphs/contributors)\r\n\r\n---\r\n\r\n## \u2764\ufe0f Support Hermes ORM\r\n\r\nIf you find Hermes ORM useful, consider supporting its development and ongoing maintenance:\r\n\r\n[![Sponsor Hermes ORM](https://img.shields.io/badge/Sponsor-Hermes%20ORM-blue?logo=github-sponsors)](https://github.com/sponsors/altxriainc)\r\n",
"bugtrack_url": null,
"license": "CC BY-ND 4.0",
"summary": "A high-performance ORM for Python with support for migrations, relations, and caching.",
"version": "0.1.7",
"project_urls": {
"Bug Tracker": "https://github.com/altxriainc/hermes/issues",
"Documentation": "https://github.com/altxriainc/hermes/wiki",
"Homepage": "https://github.com/altxriainc/hermes",
"Source Code": "https://github.com/altxriainc/hermes"
},
"split_keywords": [
"orm",
"python",
"sql",
"migrations",
"relations",
"caching"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0a792449dba673cdc70d3e4389c10ecea2b85d8c90880a47e8f513e8814839f7",
"md5": "e4ab09ec93af163be8456185f1837185",
"sha256": "4a42d6230cb7b677a0fcfd1cb171f1fc374cb8343c8e3aed11d17618b582acd2"
},
"downloads": -1,
"filename": "hermes_orm-0.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e4ab09ec93af163be8456185f1837185",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 26360,
"upload_time": "2024-11-29T00:17:51",
"upload_time_iso_8601": "2024-11-29T00:17:51.277192Z",
"url": "https://files.pythonhosted.org/packages/0a/79/2449dba673cdc70d3e4389c10ecea2b85d8c90880a47e8f513e8814839f7/hermes_orm-0.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "78d82c169a35bfd9613f04386f47c232cd6231d390f4bce24fb0f0c7385f8a3e",
"md5": "15d8b21bbacb93c041b1200a40b5a656",
"sha256": "ccd4f0c8793470e077ba2b3fc4a5a783dc8d6c506a85e1b7b9699aa7d59a2011"
},
"downloads": -1,
"filename": "hermes_orm-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "15d8b21bbacb93c041b1200a40b5a656",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 22486,
"upload_time": "2024-11-29T00:17:52",
"upload_time_iso_8601": "2024-11-29T00:17:52.362693Z",
"url": "https://files.pythonhosted.org/packages/78/d8/2c169a35bfd9613f04386f47c232cd6231d390f4bce24fb0f0c7385f8a3e/hermes_orm-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-29 00:17:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "altxriainc",
"github_project": "hermes",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "click",
"specs": [
[
"==",
"8.1.3"
]
]
},
{
"name": "aiosqlite",
"specs": [
[
"==",
"0.17.0"
]
]
}
],
"lcname": "hermes-orm"
}