A simple, yet useful Python toolkit
Project description
Noos Energy Request Toolkit
This is a simple, yet useful toolkit that supports you in writing Python clients to microservices-style apps.
Installation
Package available from the PyPi repository:
pip install noos-pyk
Usage as a library
The project currently houses a boilerplate to build Python HTTP and WebSocket clients to web services.
As an example, to implement a Python client wrapping up HashiCorp's Terraform Cloud API,
# Import the namespace within your project
from noos_pyk.clients import auth, json
# Define a bearer token authentication class
class TerraformAuth(auth.HTTPTokenAuth):
default_header = "Authorization"
default_value = "Bearer"
# Wireup all components for a JSON REST client
class TerraformClient(json.JSONClient, auth.AuthClient):
default_base_url = "https://app.terraform.io/api/"
default_content_type = "application/vnd.api+json"
default_auth_class = TerraformAuth
Development
On Mac OSX, make sure poetry has been installed and pre-configured,
brew install poetry
This project is shipped with a Makefile, which is ready to do basic common tasks.
~$ make
help Display this auto-generated help message
update Lock and install build dependencies
clean Clean project from temp files / dirs
format Run auto-formatting linters
install Install build dependencies from lock file
lint Run python linters
test Run pytest with all tests
package Build project wheel distribution
release Publish wheel distribution to PyPi
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
noos_pyk-0.0.11.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file noos_pyk-0.0.11.tar.gz
.
File metadata
- Download URL: noos_pyk-0.0.11.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1057-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75d5b01ad24e060d08218f93b10f518ad85c9d167b33b7d680b219332daaa529 |
|
MD5 | 51b10b974bb7780bb107d7a3bddb61ed |
|
BLAKE2b-256 | 6acaf4a70f4b1c0234e6892d46789c74e0039cc6d6e8a1a029f92f7e6ad42076 |
File details
Details for the file noos_pyk-0.0.11-py3-none-any.whl
.
File metadata
- Download URL: noos_pyk-0.0.11-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1057-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e70142645256f3969de7b9202b43706354196d5e3d53c64b4dbd9e4f8abe9da |
|
MD5 | afa6c2c98d3a525e497490ffaf77e981 |
|
BLAKE2b-256 | 343b8129827ca42c39f31efb4f2831f10ddf8b2f7aae77fff7d13101325630f6 |