diff --git a/README.md b/README.md index 03727cc..41ca02c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,9 @@ So I built one. `spiderweb` is a small web framework, just big enough to hold a spider. Getting started is easy: ```shell -poetry add spiderweb-framework +uv add spiderweb-framework +# or +pip install spiderweb-framework ``` Create a new file and drop this in it: @@ -43,6 +45,17 @@ if __name__ == "__main__": ## [View the docs here!](https://itsthejoker.github.io/spiderweb/#/) +### Development (using uv) + +This repository uses uv for local development and testing. + +- Create a virtual environment: `uv venv` +- Activate it (Windows): `.venv\Scripts\activate` +- Activate it (POSIX): `source .venv/bin/activate` +- Install deps (editable + dev): `uv pip install -e .[dev]` +- Run tests: `uv run python -m pytest` +- Lint/format: `uv run ruff check .` and `uv run black .` + My goal with this framework was to do three things: 1. Learn a lot @@ -68,5 +81,5 @@ And, honestly, I think I got there. Here's a non-exhaustive list of things this - CORS middleware - Optional POST data validation middleware with Pydantic - Session middleware with built-in session store -- Database support (using Peewee, but you can use whatever you want as long as there's a Peewee driver for it) +- Database support (using SQLAlchemy, but you can use whatever you want as long as there's a SQLAlchemy driver for it) - Tests (currently roughly 89% coverage) diff --git a/docs/quickstart.md b/docs/quickstart.md index 8106a25..7ab32ea 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -4,10 +4,10 @@ Start by installing the package with your favorite package manager: - + ```shell -poetry add spiderweb-framework +uv add spiderweb-framework ``` diff --git a/pyproject.toml b/pyproject.toml index 2a12af1..b88b435 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "A small web framework, just big enough for a spider." authors = [{name="Joe Kaufeld", email="opensource@joekaufeld.com"}] readme = "README.md" packages = [{include = "spiderweb"}] -license = "LICENSE.txt" +license = "MIT" exclude = [ "tests/*", "example.py", @@ -50,8 +50,11 @@ hypothesis = "^6.111.2" coverage = "^7.6.1" [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["spiderweb/spiderweb-framework"] [tool.poetry_bumpversion.file."spiderweb/constants.py"]