Framework based on FastAPI.
Project description
UltraFramework
Description
Framework for FastAPI inspired by Java Spring.
- It exposes a base entity class SQLEntity that can be derived in order to define custom entities.
- It exposes a base repository class CRUDRepository[M] that can be derived in order to define custom repositories. The following public methods are available:
- save(): None
- find_all(): None
- delete(): None
Example:
from sqlalchemy.orm import mapped_column, Mapped
from ultra_framework.entities.sql_entity import SQLEntity
from ultra_framework.repositories.crud_repository import CRUDRepository
class UserEntity(SQLEntity):
__tablename__ = "users"
__table_args__ = {"schema": "myschema"}
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str]
class UserRepository(CRUDRepository[UserEntity]):
entity_class = UserEntity
@CRUDRepository.auto_implement_one([lambda idx: UserEntity.id == idx])
def find_by_id(self, idx: int) -> UserEntity: ...
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
ultra_framework-0.0.2.tar.gz
(5.8 kB
view details)
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 ultra_framework-0.0.2.tar.gz.
File metadata
- Download URL: ultra_framework-0.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db597dc869db7cc6e380b2753af83a6511546ae0937025014025ab09b0891ecf
|
|
| MD5 |
51a8ba3d38adae801e42c73851548509
|
|
| BLAKE2b-256 |
3836be9f4baab160e635c237da68078a22466ba4fe202b06c1f278de91790863
|
File details
Details for the file ultra_framework-0.0.2-py3-none-any.whl.
File metadata
- Download URL: ultra_framework-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c91854107894efd2d602a2fad1db9f1dfc2accfc3db5d1250e22789a322f4de
|
|
| MD5 |
dec7eb5e4d6e7e2f05458af19c63dd99
|
|
| BLAKE2b-256 |
b89e2f22dbb0e384468d2c6ad6128fbb8c3c6dcfe18a555377feb6b3c56309f5
|