manageritm-client
Client to manage services on another system over a RESTful API
Getting Started
- Install manageritm server.
pip install manageritm gunicorn
- Start manageritm server on port 8000.
gunicorn --bind 0.0.0.0:8000 --workers 1 --log-level debug "manageritm.app:main()"
- Install manageritm-client.
pip install manageritm-client
- In Python, create a client, start the mitmproxy service, stop the mitmproxy service
import manageritm_client manageritm_addr = "localhost" manageritm_port = "8000" # create a manageritm client mc = manageritm_client.ManagerITMProxyClient(f'http://{manageritm_addr}:{manageritm_port}') proxy_details = mc.client() print(f"proxy port: {proxy_details['port']}") print(f"proxy webport: {proxy_details['webport']}") # start a proxy server mc.start() # set your application to use the proxy # host: "localhost" # port: f"{proxy_details['port']}" # do some work... # stop the proxy server mc.stop()
Local Development
- Check out this repository
- Create a virtual environment
make pyenv - Install Python dependencies
make install - Start the server
make server - Start a client, in a Python interpreter:
import manageritm_client manageritm_addr = "localhost" manageritm_port = "8000" # create a manageritm client mc = manageritm_client.ManagerITMProxyClient(f'http://{manageritm_addr}:{manageritm_port}') proxy_details = mc.client() print(f"proxy port: {proxy_details['port']}") print(f"proxy webport: {proxy_details['webport']}") # start a proxy server mc.start()
- Navigate a web browser to
http://localhost:<proxy webport>to watch the traffic - Configure a web browser to use the proxy port.
- Stop the client
# stop the proxy server mc.stop()
Helpful Commands
To build a package for the development version:
make all
To install a copy into your local python virtualenv
make install
To run the test cases:
make test
Metadata
Release files for manageritm-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| manageritm_client-0.1.0.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| manageritm_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / manageritm_client-0.1.0.tar.gz
| Download URL | manageritm_client-0.1.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
149a059f248eacff7eeb862c1a882bcd046a9544c44d783411cd68008b9af876
|
|
BLAKE2b-256 checksum How to use checksums |
db3d43de32e9909ee0c69a6b49cfc2ca7a21fc9dcd99cb2e35924dd8705278f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / manageritm_client-0.1.0-py3-none-any.whl
| Download URL | manageritm_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72555ca0755f06424a2dbab2ee31ee1647eb96d24ed007766b10470757262d65
|
|
BLAKE2b-256 checksum How to use checksums |
a41cd7e75b6ac94a6def79b690803332e9292a05566bdf5c6e6eac316c9f233c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|