Skip to main content

fyro

Fast, Yet Ridiculously Opinionated. A web framework on top of FastAPI that feels like Django.

FastAPI is the engine. fyro adds what a project needs around it, with one obvious place for everything: one model class gives you a Postgres table, Create/Read/Update schemas, a REST API with docs, migrations and an admin page. Database sessions, a command line, users, login and permissions are built in.

# blog/models.py
from fyro import Field, Model


class Post(Model):
    title: str = Field(max_length=200)
    body: str
    secret: str = Field(write_only=True)
    published: bool = False

That class is the table blog_post, the API at /api/blog/post (list with filters, search, ordering and paging; get; create; patch; delete) and the admin page at /admin/blog/post. Queries need no session code:

posts = await Post.objects.filter(published=True).order_by("-id").limit(10).all()

Quickstart

Needs Python 3.12+, Docker (for Postgres) and uv or pip.

uv venv && source .venv/bin/activate
uv pip install fyro

fyro new mysite && cd mysite
docker compose up -d --wait
python manage.py startapp blog
# write blog/models.py, then in mysite/settings.py:
#     installed_apps: list[str] = ["fyro.auth", "blog"]
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver        # http://127.0.0.1:8000/docs and /admin

The full walkthrough and the guides are in docs/: settings, models, querying, the automatic API, migrations, the command line, auth and permissions, the admin, and security notes.

Status

v0.1, alpha. PostgreSQL only. Relations between models come in v0.2; see what v0.1 does not do. The plan and the history of every design decision are in PLAN.md and BUILD_PROMPT.md.

Development

uv sync                     # install dependencies
docker compose up -d        # Postgres 16 on localhost:5432 (user, password, db: fyro)
uv run pytest               # tests, in random order (pytest-randomly)
uv run ruff check           # lint
uv run --only-group docs zensical serve   # docs at http://127.0.0.1:8000

How tests are written and attacked is described in test.md.

License

MIT. The admin bundles htmx (0BSD) and JetBrains Mono (OFL-1.1); their licenses are in src/fyro/admin/static/.

Metadata

Release files for fyro 0.1.0

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

Source distribution (sdist)

Source distribution for fyro 0.1.0
File Size Uploaded Provenance
fyro-0.1.0.tar.gz 104.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 217.1 kB

Release files / fyro-0.1.0.tar.gz

Download URL fyro-0.1.0.tar.gz
Size 104.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5f0e68c2739ee2600677ac8eab30784536b7fb99a3a7462ea3c3ef8c7fd97127
BLAKE2b-256 checksum
How to use checksums
d529b6d4fbfea9bd756eb191b46a4839529a132b731ade8f57e178a34932a8f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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}

Release files / fyro-0.1.0-py3-none-any.whl

Download URL fyro-0.1.0-py3-none-any.whl
Size 112.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcc51f65281130f0038f3e717263486d5ecf3dc01db5e7cd74f403d989bebe87
BLAKE2b-256 checksum
How to use checksums
b51d855cc023f0f2a3bde4ac20037518fece033f1f22b14aea2d91386a885336
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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}

Security for fyro 0.1.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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