A web-based CSV file editor and script manager for processing CSV files with Python scripts, specifically designed for NCM API operations.
- CSV File Management: Load, edit, and save CSV files through a modern web interface
- Script Management: Create, edit, download, and execute Python scripts that process CSV files
- API Key Management: Securely set and manage API keys through the web interface
- GitHub Integration: Download scripts directly from GitHub URLs (supports individual files and folders)
- NCM Library Integration: Uses the
ncmPython package for NCM API operations - Cross-Platform: Works on Windows, macOS, and Linux
-
Clone or download this repository
-
Navigate to the project folder:
Windows:
cd script_managerOr right-click in the project folder in File Explorer and select "Open in Terminal" or "Open PowerShell window here".
macOS/linux:
cd script_managerOr right-click on the project folder in Finder and select Services > New Terminal at Folder.
-
Install Python dependencies:
Windows/macOS/Linux:
pip install -r requirements.txt
This will install:
requests- For HTTP requests and downloading scripts from GitHubncm- Cradlepoint NCM API client library
-
Run the application:
Windows:
python script_manager.py
macOS/Linux:
python script_manager.py
-
Open your web browser and navigate to:
http://localhost:8000
- Load a CSV file: Click on a file from the list or upload a new one
- Edit data: Modify cells directly in the web interface
- Save changes: Click the save button to persist your changes
- Download: Export your CSV file at any time
- View available scripts: All Python scripts in the
scripts/directory are automatically listed - Create new scripts: Use the script editor to create new Python scripts
- Download from GitHub: Paste a GitHub URL to download scripts directly
- Pull from Repository: Click "Pull Repo..." to check for and download new or updated scripts from the official GitHub repository
- Run scripts: Select a script and optionally choose a CSV file, then execute them together
- Download results: After running a script, you can download the results or updated CSV files
The web interface allows you to securely set API keys as environment variables:
X_CP_API_ID/X_CP_API_KEY- Cradlepoint API credentialsX_ECM_API_ID/X_ECM_API_KEY- NCM API credentialsNCM_API_TOKEN- NCM API v3 token
Note: API keys are stored in environment variables for the current session only. They are not persisted between application restarts.
Scripts should follow a standardized format with detailed docstrings. See SCRIPT_FORMAT_GUIDE.md for complete documentation on:
- Required docstring format
- CSV column naming conventions
- API key handling
- Script structure guidelines
script_manager/
├── script_manager.py # Main application file
├── requirements.txt # Python dependencies
├── csv_files/ # Directory for CSV files
├── scripts/ # Directory for Python scripts
│ ├── Configure Devices.py
│ ├── Create NCX Resources.py
│ ├── Create NCX Sites.py
│ ├── Create Users.py
│ ├── Get Router Status.py
│ ├── Update Subscriptions.py
│ ├── Set Router Fields.py
│ ├── Unlicense Devices.py
│ └── Unregister Routers.py
├── static/ # Web interface files
│ ├── index.html
│ ├── css/
│ └── js/
└── README.md
The application uses the ncm Python package (installed via requirements.txt) for interacting with the NCM API. This package is available on PyPI and provides support for both NCM API v2 and v3.
- Python 3.6 or higher
requestslibrary (installed viarequirements.txt)ncmlibrary (installed viarequirements.txt)
See LICENSE file for details.