Skip to main content

Python client and payment helpers for the Northstar API

This project has been quarantined.

PyPI Admins need to review this project before it can be restored. While in quarantine, the project is not installable by clients, and cannot be being modified by its maintainers.

Read more in the project in quarantine help article.

Project description

northstart-sdk

Python client and payment helpers for the Northstar API.

Install

python -m pip install northstart-sdk

API client

from northstart_sdk import NorthstarClient

client = NorthstarClient(
    base_url="https://api.example.com",
    sdk_secret="your-sdk-secret",
)

for asset in client.list_assets(status="active"):
    print(asset.id, asset.name)

sdk_secret may also be provided through the NORTHSTAR_SDK_SECRET environment variable. When no secret is configured, requests are sent without the Northstar signature headers.

Payment request

from northstart_sdk import PaymentClient

payments = PaymentClient(
    appid="your-app-id",
    app_private_key_string=open("app_private_key.pem").read(),
    gateway_public_key_string=open("gateway_public_key.pem").read(),
    gateway_url="https://gateway.example.com/gateway.do",
)

request = payments.create_payment_order(
    out_trade_no="order-1001",
    total_amount="19.99",
    subject="Example order",
)
print(request.url)

RSA2 uses RSA PKCS#1 v1.5 signatures with SHA-256. PEM keys and unwrapped base64 key bodies are both accepted.

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

northstart_sdk-0.2.2.tar.gz (77.3 kB view details)

Uploaded Source

Built Distribution

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

northstart_sdk-0.2.2-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

Details for the file northstart_sdk-0.2.2.tar.gz.

File metadata

  • Download URL: northstart_sdk-0.2.2.tar.gz
  • Upload date:
  • Size: 77.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for northstart_sdk-0.2.2.tar.gz
Algorithm Hash digest
SHA256 238e37d3026af47e71ff9b731cce1b4ce74e16ce7566a939ccec526137fd8222
MD5 1f9e9796505cbd3d8016b71865353d5f
BLAKE2b-256 fc8c1a69b0c1371eddf4d62fbe79bb03dc5dfc3fee0bc704af01d6310fa90e26

See more details on using hashes here.

File details

Details for the file northstart_sdk-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: northstart_sdk-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 59.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for northstart_sdk-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 60f31106feb0e8366cf945345a4c37d6bbf6c7e7ad2c2b75ecdf1dbbbc29cc51
MD5 826450e77256257b2a29fd3bf4ca1e49
BLAKE2b-256 82933c32a22eca131c1fb4771fea8b5f2ff928a44677a7c3803b74c640092b53

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