Skip to main content

mpratyush54-sdk

Official Python SDK for Platform — registration, heartbeats, logging, config, storage helpers, and managed DB connections.

Requires Python ≥ 3.10. Package: mpratyush54-sdk

Install

pip install mpratyush54-sdk

Optional DB drivers are declared as package dependencies (psycopg2-binary, pymongo, redis).

Quick start

from platform_sdk import PlatformClient  # or: from platform_sdk import platform

client = PlatformClient()
client.init(
    project_name="my-python-service",
    platform_url="https://api.example.sslip.io",
    environment_name="development",
    databases=["postgres", "mongo", "redis"],  # optional
)

client.log("INFO", "service ready", {"pid": 1})
flag = client.config("FEATURE_X")

# After init with databases=...
rows = client.db["postgres"].execute("SELECT 1")
client.shutdown()

Singleton style:

from platform_sdk import platform

platform.init(project_name="my-service", platform_url="https://api.example.sslip.io")
platform.log("INFO", "hello")

What init() does

  1. Registers with POST /api/sdk/register
  2. Starts a daemon heartbeat thread (every 15s)
  3. Connects any of postgres / mongo / redis listed in databases (non-blocking on failure)

API surface

Method / prop Purpose
init(...) Configure + register + optional DBs
config(key) Fetch remote config value
log(level, message, metadata?) Ship a log line
storage_upload(path, bucket) Request an upload URL
db Dict of connected managers (postgres / mongo / redis)
shutdown() Disconnect DBs

There is no built-in Flask/Django middleware yet — record metrics yourself or put a reverse proxy in front. See examples for manual timing patterns.

Examples

File Topic
examples/01_basic.py Init + log + config
examples/02_with_databases.py Postgres / Mongo / Redis
examples/03_flask_manual_metrics.py Flask + timed requests
examples/04_fastapi_manual_metrics.py FastAPI + middleware timing

Docs: Python quickstart · API

License

MIT

Metadata

Release files for mpratyush54-sdk 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mpratyush54-sdk 1.0.3
File Size Uploaded Provenance Actions
mpratyush54_sdk-1.0.3.tar.gz 7.9 kB With provenance Details for mpratyush54_sdk-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mpratyush54-sdk 1.0.3
File Interpreter ABI Platform Actions
mpratyush54_sdk-1.0.3-py3-none-any.whl Python 3 none any Details for mpratyush54_sdk-1.0.3-py3-none-any.whl

Total release size: 14.3 kB

Release files / mpratyush54_sdk-1.0.3.tar.gz

Download URL mpratyush54_sdk-1.0.3.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5074783229f3fdacb88f1c8b2d9cf26f647eac43a7c6015daea3b4dbb65f312f
BLAKE2b-256 checksum
How to use checksums
8de7cee968913dbfea9b92cc738165875bddb2f608b2cb504a4c85f52513be56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 1, 2026.

Transparency log

Release files / mpratyush54_sdk-1.0.3-py3-none-any.whl

Download URL mpratyush54_sdk-1.0.3-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8f484106142eff2ef1dc3a05a64cac0320234bbd2331a6326d3b870dfe4274a
BLAKE2b-256 checksum
How to use checksums
c74d4190faed6514bad0e98177af49e947da0bffd9682aafd1097d354742e0d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 1, 2026.

Transparency log

Security for mpratyush54-sdk 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mpratyush54_sdk-1.0.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page