https://github.com/r8vnhill/echo-app-py-uv
Modular Python project using uv workspaces to separate business logic and application code. Built for a step-by-step educational guide on maintainable project structure.
https://github.com/r8vnhill/echo-app-py-uv
build-system build-systems cli-app dependency-management dibs-course educational example-project modular-architecture monorepo pyproject pyproject-toml python starter-template uv virtual-environment workspace
Last synced: about 2 months ago
JSON representation
Modular Python project using uv workspaces to separate business logic and application code. Built for a step-by-step educational guide on maintainable project structure.
- Host: GitHub
- URL: https://github.com/r8vnhill/echo-app-py-uv
- Owner: r8vnhill
- License: bsd-2-clause
- Created: 2025-04-15T00:10:06.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-15T03:02:24.000Z (about 2 months ago)
- Last Synced: 2025-04-15T13:56:24.974Z (about 2 months ago)
- Topics: build-system, build-systems, cli-app, dependency-management, dibs-course, educational, example-project, modular-architecture, monorepo, pyproject, pyproject-toml, python, starter-template, uv, virtual-environment, workspace
- Language: Python
- Homepage: https://dibs.pages.dev
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# echo-app-py-uv




[](https://dibs.pages.dev/docs/build-systems/init/uv)
[](https://dibs.pages.dev/docs/build-systems/modular-design/uv)This repository accompanies two lessons on building modern Python projects using [`uv`](https://docs.astral.sh/uv/), a fast and user-friendly tool for managing virtual environments and dependencies via `pyproject.toml`.
> 📘 The lessons are written in Spanish and can be found at:
>
> - [Lesson 1 – Basic setup](https://dibs.pages.dev/docs/build-systems/init/uv)
> - [Lesson 2 – Modular structure](https://dibs.pages.dev/docs/build-systems/modular-design/uv)
>
> However, the code and repository are written in English to ensure broader accessibility.## 🧱 Project structure
This project follows a modular design using `uv workspaces`, separating business logic (`core`) from the application layer (`app`).
```
.
├── core
│ ├── echo_core
│ │ ├── __init__.py
│ │ └── echo.py
│ └── pyproject.toml
├── app
│ ├── echo_app
│ │ ├── __init__.py
│ │ └── main.py
│ └── pyproject.toml
├── pyproject.toml
├── uv.lock
└── README.md
```## ▶️ How to run it
From the root directory, you can execute the application like this:
```bash
uv run app/echo_app/main.py Butcher Hughie Kimiko Frenchie M.M.
```Expected output:
```text
Butcher
Hughie
Kimiko
Frenchie
M.M.
```## 💡 What's inside?
The `core` module contains a reusable function:
```python
# core/echo_core/echo.py
def echo(message: str) -> str:
return message
```The `app` module consumes it:
```python
# app/echo_app/main.py
from echo_core import echodef main(args: list[str]):
for arg in args:
print(echo(arg))if __name__ == "__main__":
import sys
main(sys.argv[1:])
```## 📖 Learn more
These lessons guide you from a simple script to a **modular and scalable project structure**, preparing you for more advanced topics like testing, packaging, and CI.
- [Lesson 1 – Basic setup](https://dibs.pages.dev/docs/build-systems/init/uv)
- [Lesson 2 – Modular structure](https://dibs.pages.dev/docs/build-systems/modular-design/uv)## 🔗 Resources
- [Official uv documentation – "Using workspaces"](https://docs.astral.sh/uv/concepts/projects/workspaces/)
- [Official uv documentation – "Working on projects"](https://docs.astral.sh/uv/guides/projects/)
- [pyproject.toml specification](https://packaging.python.org/en/latest/specifications/pyproject-toml/)