Skip to main content

Shared base logic used across AldanDev projects.

Project description

notora

Shared base logic used across AldanDev projects.

  • v1 (legacy): notora.v1
  • v2 (next-gen toolkit): notora.v2

v2 quickstart

from notora.v2.repositories import Repository, RepoConfig
from notora.v2.services import RepositoryService, ServiceConfig

repo = Repository(
    User,
    config=RepoConfig(default_limit=50),
)
service = RepositoryService(
    repo,
    config=ServiceConfig(detail_schema=UserSchema, list_schema=UserListSchema),
)

Listing and pagination

from notora.v2.repositories import QueryParams, PaginationParams

rows = await service.list_raw(
    session,
    limit=None,  # no limit
)

params = QueryParams(filters=[...], ordering=[...], limit=None)
rows = await service.list_raw_params(session, params)

page = await service.paginate_params(
    session,
    PaginationParams(limit=20, offset=0, filters=[...]),
)

Repository/service factories

from notora.v2.repositories import build_repository, RepoConfig
from notora.v2.services import build_service, ServiceConfig

repo = build_repository(User, config=RepoConfig(default_limit=25))
service = build_service(User, repo=repo, service_config=ServiceConfig(detail_schema=UserSchema))

M2M sync modes

from notora.v2.services import M2MSyncMode

class UserService(RepositoryService[UUID, User, UserSchema]):
    m2m_sync_mode: M2MSyncMode = 'add'

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

notora-0.0.0.tar.gz (54.2 kB view details)

Uploaded Source

Built Distribution

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

notora-0.0.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file notora-0.0.0.tar.gz.

File metadata

  • Download URL: notora-0.0.0.tar.gz
  • Upload date:
  • Size: 54.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for notora-0.0.0.tar.gz
Algorithm Hash digest
SHA256 59e9aa3729cea35b5d97b578be32d328b123672aac47e5128ad56b1962cb2647
MD5 8b465894575fa8b9a10edd5029fbe64e
BLAKE2b-256 787b3fa2150a8132ee1faaad8c0d0ae83bd4176ca7b7ebb4916da406bdcc58bb

See more details on using hashes here.

File details

Details for the file notora-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: notora-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for notora-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ae5ba2b59474bf8bb2b394c5eb8c330c05e8962b405ecb395fbef75037565a6
MD5 caf9d7df770b1d713ba5d024ee84131f
BLAKE2b-256 ec9ff8b41d5bebd695ea2876a950c72cbfb0c3fa656e0c2256dc8a1e23d38936

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