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.3.tar.gz
(5.5 kB
view details)
File details
Details for the file cchttpserver-0.6.3.tar.gz
.
File metadata
- Download URL: cchttpserver-0.6.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75ad0f8fb406025892ee4945c88df9cdb0d4976c4449813a31964433b385df4f |
|
MD5 | 9ff159275b30ac7cbc652348eb873bbe |
|
BLAKE2b-256 | df82be1151013573004e2f4d126735c19bb213049695684af00f26fe61f8f81d |