A simple, yet useful Python toolkit
Project description
Noos Energy Python Toolkit
This is a simple, yet useful toolkit that supports you in writing microservices-style Python 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 clients for REST 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
clean Clean project from temp files / dirs
format Run auto-formatting linters
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.1.tar.gz
(5.0 kB
view hashes)