This is an example of an una monorepo.
What this is for:
- uv is the best way to use Python, and it has some monorepo/workspace support.
- If your build artifacts are Dockerfiles, uv is probably enough.
- But if you want to build Python wheels or similar in monorepos, read on!
Read more about una:
This repository is basically the result of the following steps:
uv init una-example
cd una-example
git init
uv add --dev una
uv run una create workspace
uv sync
uv run una sync
uv add --dev basedpyright pytestAnd then some extra settings added to all the pyproject.toml files to get Pyright and Pytest to play nice.
Sync the una dependency graph (that is, resolve all dependencies between packages in the monorepo):
uv run una syncFormatting, linting etc (these are specified at the top of the root pyproject.toml).
make fmt
make lint
make check
make test
make allBuild wheels (outputs to dist/):
make buildmake build-docker
docker run --rm -p 8000:8000 -it exampleThen curl the running server:
$ curl localhost:8000
┌────────────────┐
│Hello from Una! │
└────────────────┘
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||