Skip to main content

No project description provided

Project description

manageritm-client

Client to manage services on another system over a RESTful API

Getting Started

  1. Install manageritm server.
    pip install manageritm gunicorn
    
  2. Start manageritm server on port 8000.
    gunicorn --bind 0.0.0.0:8000 --workers 1 --log-level debug "manageritm.app:main()"
    
  3. Install manageritm-client.
    pip install manageritm-client
    
  4. 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

  1. Check out this repository
  2. Create a virtual environment
    make pyenv
    
  3. Install Python dependencies
    make install
    
  4. Start the server
    make server
    
  5. 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()
    
  6. Navigate a web browser to http://localhost:<proxy webport> to watch the traffic
  7. Configure a web browser to use the proxy port.
  8. 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

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

manageritm_client-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

manageritm_client-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file manageritm_client-0.1.0.tar.gz.

File metadata

  • Download URL: manageritm_client-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for manageritm_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 149a059f248eacff7eeb862c1a882bcd046a9544c44d783411cd68008b9af876
MD5 8358ac90dbfd242fc5ba595ca21826ba
BLAKE2b-256 db3d43de32e9909ee0c69a6b49cfc2ca7a21fc9dcd99cb2e35924dd8705278f4

See more details on using hashes here.

File details

Details for the file manageritm_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for manageritm_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72555ca0755f06424a2dbab2ee31ee1647eb96d24ed007766b10470757262d65
MD5 d9ce3bb3a454b4a40d27f9f44fccb683
BLAKE2b-256 a41cd7e75b6ac94a6def79b690803332e9292a05566bdf5c6e6eac316c9f233c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page