Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Genie

Genie (geniespec on PyPI) generates API code from an api.yaml spec. The output is a package you install, not code you commit.

uvx geniespec build --spec api.yaml [--output .genie]
uvx geniespec watch --spec api.yaml [--output .genie]
  • build writes <output>/python: a project with pyproject.toml and src/<service>_api/v<major>/ (api, endpoints, resources, internal, exceptions). Only changed files are rewritten and files it no longer generates are removed.
  • watch rebuilds whenever the spec changes. If the spec is invalid it logs the error and keeps the previous output.
  • Consumers depend on the output as an editable path dependency, e.g. my-service-api = { path = ".genie/python", editable = true } in [tool.uv.sources], and import it as my_service_api.v1.
  • Generated code needs kiba-core (core.api, core.util.typing_util), pydantic and starlette from the consumer.

Development

make install
make lint-check type-check test

Merges to main publish a dev version to PyPI. To release, bump version in pyproject.toml in a PR, then run the Release workflow on main (Actions → Release → Run workflow). It tags vX.Y.Z and the Publish workflow publishes it. Only the release workflow can push version tags.

Things that need work

Typing of params and fields in general

Enum and OneOf not supported yet

I think we need to create an object for Type. what would it look like?

class BaseFieldType:
    isNullable: bool


class RawFieldType(BaseFieldType):
    name: str


class ClassFieldType(BaseFieldType):
    fieldType: RawFieldType


class ListFieldType:(BaseFieldType)
    fieldType: RawFieldType
    isNullable: bool


class MappingFieldType(BaseFieldType):
    keyFieldType: RawFieldType
    valueFieldType: RawFieldType


class OneOfFieldType(BaseFieldType):
    fieldTypes: list[RawFieldType]


class EnumFieldType(BaseFieldType):
    values: list[str]

Metadata

Release files for geniespec 0.1.1.dev2

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

Source distribution (sdist)

Source distribution for geniespec 0.1.1.dev2
File Size Uploaded Provenance
geniespec-0.1.1.dev2.tar.gz 18.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for geniespec 0.1.1.dev2
File Interpreter ABI Platform
geniespec-0.1.1.dev2-py3-none-any.whl Python 3 none any Details

Total release size: 43.7 kB

Release files / geniespec-0.1.1.dev2.tar.gz

Download URL geniespec-0.1.1.dev2.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1da5070de9f7330c30d37fd178065cdcb53d940cfb8b35bdcbd844f812822744
BLAKE2b-256 checksum
How to use checksums
9f440dbf01585a80b5f3d22f406f57d5fc3e19dbeed96d1122e2f7664c583007
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / geniespec-0.1.1.dev2-py3-none-any.whl

Download URL geniespec-0.1.1.dev2-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0af9976942b00f904aaaefaddf67e933f4bdd89666a6b0b047943ffdae1e25d3
BLAKE2b-256 checksum
How to use checksums
a2f2b1a01d907dee2c5ee8f3110e83917d8725f0c48d9eb19e38599d2c2a39a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for geniespec 0.1.1.dev2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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