🧱 switch to hatchling, update docs and dev instructions
This commit is contained in:
parent
1a35ca0ed8
commit
e2064ddba7
3 changed files with 23 additions and 7 deletions
17
README.md
17
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:
|
`spiderweb` is a small web framework, just big enough to hold a spider. Getting started is easy:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
poetry add spiderweb-framework
|
uv add spiderweb-framework
|
||||||
|
# or
|
||||||
|
pip install spiderweb-framework
|
||||||
```
|
```
|
||||||
|
|
||||||
Create a new file and drop this in it:
|
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/#/)
|
## [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:
|
My goal with this framework was to do three things:
|
||||||
|
|
||||||
1. Learn a lot
|
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
|
- CORS middleware
|
||||||
- Optional POST data validation middleware with Pydantic
|
- Optional POST data validation middleware with Pydantic
|
||||||
- Session middleware with built-in session store
|
- 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)
|
- Tests (currently roughly 89% coverage)
|
||||||
|
|
|
@ -4,10 +4,10 @@ Start by installing the package with your favorite package manager:
|
||||||
|
|
||||||
<!-- tabs:start -->
|
<!-- tabs:start -->
|
||||||
|
|
||||||
<!-- tab:poetry -->
|
<!-- tab:uv -->
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
poetry add spiderweb-framework
|
uv add spiderweb-framework
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- tab:pip -->
|
<!-- tab:pip -->
|
||||||
|
|
|
@ -5,7 +5,7 @@ description = "A small web framework, just big enough for a spider."
|
||||||
authors = [{name="Joe Kaufeld", email="opensource@joekaufeld.com"}]
|
authors = [{name="Joe Kaufeld", email="opensource@joekaufeld.com"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
packages = [{include = "spiderweb"}]
|
packages = [{include = "spiderweb"}]
|
||||||
license = "LICENSE.txt"
|
license = "MIT"
|
||||||
exclude = [
|
exclude = [
|
||||||
"tests/*",
|
"tests/*",
|
||||||
"example.py",
|
"example.py",
|
||||||
|
@ -50,8 +50,11 @@ hypothesis = "^6.111.2"
|
||||||
coverage = "^7.6.1"
|
coverage = "^7.6.1"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["hatchling"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel]
|
||||||
|
packages = ["spiderweb/spiderweb-framework"]
|
||||||
|
|
||||||
[tool.poetry_bumpversion.file."spiderweb/constants.py"]
|
[tool.poetry_bumpversion.file."spiderweb/constants.py"]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue