Skip to main content

Official Python SDK for the PostZen Public API — manage profiles, connected social accounts, media uploads, and post publishing

Project description

postzen-python

The PostZen Public API lets server-side integrations manage profiles, connected social accounts, OAuth connection flows, media uploads, and post creation.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.23.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.10+

Installation & Usage

pip install

pip install postzen-sdk

Then import the package:

import postzen

From source

pip install git+https://github.com/postzen-dev/postzen-python.git

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import postzen
from postzen.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.postzen.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = postzen.Configuration(
    host = "https://api.postzen.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = postzen.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with postzen.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = postzen.AccountsApi(api_client)
    account_id = 'account_id_example' # str | PostZen account id.

    try:
        # Disconnect an account
        api_response = api_instance.disconnect_account(account_id)
        print("The response of AccountsApi->disconnect_account:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AccountsApi->disconnect_account: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.postzen.dev

Class Method HTTP request Description
AccountsApi disconnect_account DELETE /v1/accounts/{accountId} Disconnect an account
AccountsApi list_accounts GET /v1/accounts List accounts
ConnectApi complete_connect POST /v1/connect/{platform} Complete an OAuth connection
ConnectApi create_connect_url GET /v1/connect/{platform} Create an OAuth connect URL
MediaApi create_media_presign POST /v1/media/presign Create a presigned media upload URL
PostsApi create_post POST /v1/posts Create a post
ProfilesApi create_profile POST /v1/profiles Create a profile
ProfilesApi delete_profile DELETE /v1/profiles/{profileId} Delete a profile
ProfilesApi get_profile GET /v1/profiles/{profileId} Get a profile
ProfilesApi list_profiles GET /v1/profiles List profiles
ProfilesApi update_profile PUT /v1/profiles/{profileId} Update a profile

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication

Author

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

postzen_sdk-1.0.0.tar.gz (48.2 kB view details)

Uploaded Source

Built Distribution

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

postzen_sdk-1.0.0-py3-none-any.whl (95.1 kB view details)

Uploaded Python 3

File details

Details for the file postzen_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: postzen_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for postzen_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c2f18606b0248dcaa7bc02a203637543c781e51ff1de84d35bc685b5f6401051
MD5 3635424e7c116d9fd050fe87b8da1684
BLAKE2b-256 6a06cd56a2d4b52242775158893c8e5e57efab9bbe25214ca66d51f50caf8a78

See more details on using hashes here.

File details

Details for the file postzen_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: postzen_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 95.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for postzen_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 541be90172e917b60aebfb9c25ebb13faf35eabe68b056c3fad514a6b6ab70c3
MD5 912fc200f0c1a98eb7268c3f0843a458
BLAKE2b-256 fd277c4eddce0ad5837de3aca150e71384002701c52606a0347ca7496e690efc

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