Tool for managing resources on a remove machine using openapi
Project description
Netport
Netport is a resource management solution for single Unix machine. Netport manages the access to different types ot resources on the OS that cannot be accessed by multiple users.
Today Netport is capable to manage: ports, files, processes and network interfaces.
Installation
Netport is a python module that communicates with a Redis database in order to hold and manage its resources.
Netport Server
pip install
To Install Netport, run the following command in your python virtual environment
pip install netport
development installation
Clone this repository:
git clone https://github.com/IgalKolihman/netport.gitthen run:
pip install -r reguirements. ext
installing the redis database
Netport integrates with redis, so in order to be able to run the Netport server, a database must be accessible somewhere in the network.
To install and run a basic Redis database locally on your PC, run the following commands:
sudo apt install redis
systemctl start redis
If Redis is already installed on the machine, run the following command to check the status of the process:
systemctl status redis
Netport Client
pip install
Install the package using pip:
pip install NetportClient
Then import the package in your code:
import netport_client
Running Server
Please follow the installation procedure for how to install the Netport server and then run the following command in your terminal:
netport
After running, a link will appear in the terminal to the server's url. The API documentation will be available at: "http://host_ip:port/docs"
Configuration
When initialized, Netport tries to connect to the Redis database. Netport connects with his default values, but it is possible to change them.
Netport will override its default values if specific environment variables are set. The following table describes those variables and their purpose:
Variable | Description | Defanlt |
---|---|---|
NETPORT_REDIS_HOST | Redis's host name to connect | 0.0.0.0 |
NETPORT_REDIS_PORT | Redis's DB port to connect | 6379 |
NETPORT_REDIS_DB | The DB number inside redis to use | 0 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file netport-0.2.0.tar.gz
.
File metadata
- Download URL: netport-0.2.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e20a27f8ab65e84311db746f9e53e3fc47efe90784b85cbb98ea3bfef7d0d9 |
|
MD5 | eef3f5ab493fed8a43c0cd18bfe8ddd0 |
|
BLAKE2b-256 | e24597b40feda3a006fe193593dc18b02e54756cb9416032f5653381ed6c5d7b |
File details
Details for the file netport-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: netport-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d19d864e1a33814dcbc2591a34eae012969c5108abfc0227ab57d6262f579e8c |
|
MD5 | a53d57d48f21d2aa7740e2dc053aab26 |
|
BLAKE2b-256 | 8eecff2cd55fac0506105ed55643d979e9865cd7b57a178a63556114480a211a |