Skip to main content

Minimal Python framework for building static websites with component-style APIs.

Project description

Astris

Tests

Astris is a minimal Python framework for building static websites using component-style APIs.

Installation

pip install astris

Quick start with CLI

Create a new project scaffold:

astris new my_site
cd my_site
uv run python main.py

Build static files:

uv run python main.py build

Basic usage

from astris import AstrisApp
from astris.lib import Body, H1, Html

app = AstrisApp()


@app.page("/")
def home():
	return Html(children=[
		Body(children=[
			H1(children=["Hello from Astris"]),
		])
	])


if __name__ == "__main__":
	app.run_dev()

Development

uv sync --group dev
uv pip install -e .
uv run --group dev pytest

Continuous Integration

GitHub Actions runs tests on push and pull request events targeting main using Python 3.11, 3.12, and 3.13. The workflow is defined in .github/workflows/tests.yml.

Release checklist

make release-check

Equivalent manual commands:

uv sync --group dev
uv run --group dev pytest
uv run --group dev python -m build
uv run --group dev twine check dist/*.whl dist/*.tar.gz

example.py in this repository is an internal framework demo and not the standard end-user workflow.

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

astris-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

astris-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file astris-0.1.0.tar.gz.

File metadata

  • Download URL: astris-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for astris-0.1.0.tar.gz
Algorithm Hash digest
SHA256 447946051c0639628f1543e01b908c2bf5ea1da556fbb5ebb5b58feae46ea42b
MD5 08bac5b30395e967ab8a2a861cf7d458
BLAKE2b-256 670f761bdbf9e944183f35540f329aa5207cce11024add73d9a1216b8dada4d2

See more details on using hashes here.

File details

Details for the file astris-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: astris-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for astris-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 655822c01caca761be558250ccb0a5e8f404d906daa637c1ec873b35cae47847
MD5 0a24214275ab3e74ae09b5493993e0ca
BLAKE2b-256 1443d21ec63bc16d5401333c9a88238e91baa0adba307c169af8493e688085f0

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