Skip to main content

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


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.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

ultra_framework-0.0.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file ultra_framework-0.0.1.tar.gz.

File metadata

  • Download URL: ultra_framework-0.0.1.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

Hashes for ultra_framework-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f96a29c7961a02bed75bc433feef1861c83774fdd200b48b104efafa315ed16f
MD5 ddd1a18d8473a3e7674ead0e8b945416
BLAKE2b-256 870c9d43be423d17f164233b568c13542d7b0c47924bca190981f6791f557595

See more details on using hashes here.

File details

Details for the file ultra_framework-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ultra_framework-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 315e78cd142d132b23faf6d14febaf3faa1ea72fd5fa7783ca756350d1e75d81
MD5 b74831474274997d58761d47ea0b680e
BLAKE2b-256 3564e89baa183a59402730538899a61c7a0cdf126d6b6ab4e53f78e2f3840e68

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