Skip to main content

No project description provided

Project description

PingPong Python SDK

Example

import os

from pingpongsdk import PingPong
from pingpongsdk.deployments.model import CreateDeployment


_API_KEY = os.getenv("X_MEDIAMAGIC_KEY")


if __name__ == '__main__':
    pingpong = PingPong(_API_KEY)

    model = pingpong.models.get_by_id(id='4954c9fd-7fc2-4d4c-a036-f23f7605fa69')

    try:
        deployment = pingpong.deployments.create(deployment=CreateDeployment(
            name="example-deployment",
            model_id=model.id,
            args={
                'input_image_file': 'https://cdn.mediamagic.dev/media/eb341446-be53-11ed-b4a8-66139910f724.jpg',
            }
        ))

        print(model.name)
        print(deployment.job.results)
    except Exception as e:
        print(e)

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

pingpongsdk-0.1.2.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

pingpongsdk-0.1.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file pingpongsdk-0.1.2.tar.gz.

File metadata

  • Download URL: pingpongsdk-0.1.2.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.2 Darwin/22.1.0

File hashes

Hashes for pingpongsdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5c89e018cd598f1552eba12d88c730ea8695fa3ce08c8436b6efc23de471ab4b
MD5 52cccfcecb69024dd6f7b10c5a7b8df8
BLAKE2b-256 df875b5c22ff02672de918011509c5b4667a9440f71f66dd2fa0620e0fc3ef64

See more details on using hashes here.

File details

Details for the file pingpongsdk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pingpongsdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.2 Darwin/22.1.0

File hashes

Hashes for pingpongsdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 42e43b5e8d59eeb1b031ff47952441ba557777b0e0a3eb5f000902c6b451026b
MD5 be7ace18d6910020abcc07a53321d59c
BLAKE2b-256 142533a0858649cb05bfa2c8195c25ccb80e5faff42c4fe3700ba68c80907474

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