NI-REST transforms the network-importer library into a robust, scalable REST API service. It allows you to run network import and automation jobs via HTTP, track their progress in real-time, and manage all configuration through a clean web interface and environment variables.
The service features a powerful CLI for easy management and automatically adapts its execution strategy, running jobs asynchronously with Celery workers when available, or synchronously for simpler setups.
This README provides a brief overview. For detailed guides on installation, configuration, and usage, please see the Full Documentation.
For those who want to get started immediately:
-
Install the package:
pip install network-importer-rest
-
Configure your environment. Create a
.envfile in your project root:# .env DJANGO_SECRET_KEY='a-long-random-string-here' # For a simple start, NI-REST will create a local SQLite database automatically.
-
Initialize and start the server:
# Initialize the database ni-rest manage migrate ni-rest manage createsuperuser # Start the server in development mode ni-rest start --dev
-
Access the service:
- API Docs:
http://<host>:<port>/api/docs/ - Admin UI:
http://<host>:<port>/admin/
(Note: In development mode, this defaults to
http://127.0.0.1:8000) - API Docs: