Skip to main content

A simple, yet useful Python toolkit

Project description

CircleCI

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


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.12.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

noos_pyk-0.0.12-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file noos_pyk-0.0.12.tar.gz.

File metadata

  • Download URL: noos_pyk-0.0.12.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.8 Linux/5.15.0-1057-aws

File hashes

Hashes for noos_pyk-0.0.12.tar.gz
Algorithm Hash digest
SHA256 80b8c1536f7a4be66aca93f3cf2b0ece92f74fca97b994b1df24655f9fb8faa1
MD5 fa9898cc6a86e7173fa9558965f4d5dd
BLAKE2b-256 f60a54eed4514d51d4b8cc04f59dfdf7491754eec7c31f0474d23baa3dfda792

See more details on using hashes here.

File details

Details for the file noos_pyk-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: noos_pyk-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.8 Linux/5.15.0-1057-aws

File hashes

Hashes for noos_pyk-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 df92f0400d515c026aceb7a50616bac3c290ef1826699aa8a9bb0f4c6e72b5a0
MD5 78b7a1cf4febfc33a5d9c894541eb60e
BLAKE2b-256 6714bcea67b2bb7a7b6102456888d56adfa94a1652724c2c2887bcde11a22262

See more details on using hashes here.

Supported by

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