Skip to main content

http server for claimchain blocks

Project description

Simple http-server for “claimchain” blocks. It uses Flask to serve HTTP GET and authenticated PUT requests.

getting started

  • install with pip install cchttpserver

  • run python -m cchttpserver which will tell you to create a config file and provides a simple example. Create a config.py file and run CCHTTPSERVER_CONFIG=config.py python -m cchttpserver.

  • Then open another terminal and open a python prompt with “python” and type something like:

    import requests
    requests.put("http://USER:PASSWORD@localhost:5000/key1", "data1")
    r = requests.get("http://localhost:5000/key1")
    assert r.status_code == 200
    requests.delete("http://USER:PASSWORD@localhost:5000/USER/")
    r = requests.get("http://localhost:5000/key1")
    assert r.status_code == 404

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

cchttpserver-0.6.2.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file cchttpserver-0.6.2.tar.gz.

File metadata

  • Download URL: cchttpserver-0.6.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: devpi-server/4.7.1 (py2.7.13; linux2)

File hashes

Hashes for cchttpserver-0.6.2.tar.gz
Algorithm Hash digest
SHA256 61634ab20bc241a1bb2327a0a0386f472a1ab893610a09aa5ed9173906ee5db5
MD5 3aff968f975bab9422c24ddd9ab936bf
BLAKE2b-256 1bdbbc1414a63d4f83edccdb74f2f17869de223e050ebec9baf7492d41f78150

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