|
1 | 1 | # Developer Toolkit API |
2 | 2 |
|
3 | | -The Developer Toolkit API is a modular backend service built with FastAPI. It provides a growing set of utility endpoints that simplify common developer tasks, such as JSON formatting and string manipulation. This project is designed for ease of use, extensibility, and clean code organization. |
| 3 | +The Developer Toolkit API is a modular backend service built with FastAPI. It provides a growing set of utility endpoints to simplify common developer tasks, such as JSON formatting and string manipulation. This project is designed for clarity, scalability, and easy testing. |
4 | 4 |
|
5 | 5 | ## Features |
6 | 6 |
|
7 | 7 | - JSON prettifier (minify and beautify raw JSON) |
8 | | -- Modular, scalable route structure |
9 | | -- Automatically generated OpenAPI documentation |
10 | | -- Lightweight and fast with FastAPI |
11 | | -- Unit testing with `pytest` |
12 | | -- Optional containerization with Docker |
13 | | -- CI-ready with GitHub Actions (coming soon) |
| 8 | +- Modular route structure using FastAPI routers |
| 9 | +- Auto-generated OpenAPI docs (Swagger UI and ReDoc) |
| 10 | +- Unit tested with `pytest` |
| 11 | +- Continuous integration using GitHub Actions |
| 12 | +- Optional Docker setup (coming soon) |
14 | 13 |
|
15 | 14 | ## Project Structure |
16 | 15 |
|
| 16 | + |
17 | 17 | ```c# |
18 | 18 | developer-toolkit-api/ |
19 | 19 | ├── app/ |
@@ -54,11 +54,39 @@ By default, the API will be available at: |
54 | 54 | `http://localhost:8000` |
55 | 55 |
|
56 | 56 | ## Running tests |
57 | | -Comming soon in the `tests/` durectory using `pytest`. |
| 57 | +Unit tests are written with pytest. |
| 58 | + |
| 59 | +To run tests locally: |
| 60 | + |
| 61 | +```bash |
| 62 | +`PYTHONPATH=$(pwd) pytest` |
| 63 | +``` |
| 64 | +You can also use `pytest.ini` to simplify local test runs: |
| 65 | + |
| 66 | +pytest.ini |
| 67 | + |
| 68 | +```bash |
| 69 | +[pytest] |
| 70 | +python_paths = . |
| 71 | +``` |
| 72 | +Then run |
| 73 | + |
58 | 74 | ```bash |
59 | 75 | pytest |
60 | 76 | ``` |
61 | 77 |
|
| 78 | +Continuous Integration |
| 79 | + |
| 80 | +Tests automatically run on each push and pull request using GitHub Actions. The workflow is defined in .github/workflows/ci.yml. |
| 81 | + |
| 82 | +To trigger a run: |
| 83 | + |
| 84 | + Push any commit |
| 85 | + |
| 86 | + Open a pull request |
| 87 | + |
| 88 | +You can view the results in the Actions tab of the repository. |
| 89 | + |
62 | 90 | ## API documentation |
63 | 91 |
|
64 | 92 | FastAPI automatically generates two UIs: |
@@ -86,6 +114,7 @@ Response: |
86 | 114 | "prettified": "{\n \"key\": \"value\"\n}" |
87 | 115 | } |
88 | 116 | ``` |
| 117 | + |
89 | 118 | ## Comming soon |
90 | 119 |
|
91 | 120 | - UUID Generator |
|
0 commit comments