| Project | | Status |
|-----------|:----|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CI/CD | | [](https://github.com/JacobCoffee/niapi/actions/workflows/publish.yaml) [](https://github.com/JacobCoffee/niapi/actions/workflows/ci.yaml) [](https://github.com/JacobCoffee/niapi/actions/workflows/docs.yaml) [](https://github.com/JacobCoffee/niapi/actions/workflows/github-code-scanning/codeql) |
| Package | | [](https://badge.fury.io/py/niapi)  |
| Quality | | [](https://codecov.io/gh/JacobCoffee/niapi) [](https://sonarcloud.io/summary/new_code?id=JacobCoffee_niapi) [](https://sonarcloud.io/summary/new_code?id=JacobCoffee_niapi) [](https://sonarcloud.io/summary/new_code?id=JacobCoffee_niapi) [](https://sonarcloud.io/summary/new_code?id=JacobCoffee_niapi) [](https://sonarcloud.io/summary/new_code?id=JacobCoffee_niapi) [](https://snyk.io/test/github/JacobCoffee/niapi) |
| Community | | [](https://twitter.com/_scriptr) |
| Meta | | [](https://github.com/JacobCoffee/niapi) [](https://github.com/astral-sh/ruff) [](https://github.com/psf/black) [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/sponsors/JacobCoffee) |
[](https://sonarcloud.io/summary/new_code?id=JacobCoffee_niapi)
Table of Contents
About
Installation
Usage
Install the project:
Run the project:
NOTE: From within the virtual environment
Using the CLI:
# via curl
➜ curl --request GET \
--url 'http://0.0.0.0:8000/calculator/ip?ip=4.8.15.16&prefix=23' \
--header 'Content-Type: application/json'
# via App CLI
# TODO
app calculate "10.248.15.39/29"
Using the API
- Browse to:
- Use the auto-generated API docs to interact with the API
From around the web:
Browse to https://niapi.app/ and use the front page form, API, or curl
to interact with the API.
Contributing
See CONTRIBUTING.rst for more information.
Start the app:
Start the TailwindCSS watcher:
tailwindcss -i niapi/domain/web/resources/input.css -o niapi/domain/web/resources/style.css --watch
Contributors
License
MIT
Acknowledgements
- Built on Litestar and Pydantic
- Using https://feathericons.dev/
- Using TailwindCSS
Screenshots
