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.1.tar.gz (80.0 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.1-py3-none-any.whl (58.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: northstart_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 80.0 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.1.tar.gz
Algorithm Hash digest
SHA256 5a3939bae392a159d09b94ddb5bd0e1f5c5fbd3694ecb4cec6adc9a7607bbb12
MD5 8f3d6854c9cb4085bc15ebddc8f3b77c
BLAKE2b-256 4d36ee1b16a21605d3e35b09d513f5fd59a23309f83c66fe43502ea731e1606f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: northstart_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 58.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b3f5a56fc658479d6f4fd36b14f3fcdd630bc774821d8c0fba5b50592ae90ca
MD5 fafa840e6261a251224abb54bb6102d4
BLAKE2b-256 14e26bce6439493af2486559002ff592022d271a0e2aefbb739b9d5d74f9219f

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