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
- Account
- AccountProfileSummary
- AccountsListResponse
- ApiPost
- ApiPostAccount
- ApiPostPlatformResult
- ConnectCompleteErrorResponse
- ConnectCompleteRequest
- ConnectCompleteResponse
- ConnectStartResponse
- CreatePostReplayResponse
- CreatePostRequest
- CreatePostResponse
- CreatePostTarget
- ErrorResponse
- FacebookSettings
- InstagramSettings
- InstagramSettingsUserTagsInner
- LinkedInSettings
- MediaPresignRequest
- MediaPresignResponse
- MessageResponse
- Pagination
- PaymentRequiredError
- PaymentRequiredErrorDetails
- PinterestSettings
- PostMediaItem
- PostPlatformSettings
- Profile
- ProfileCreateRequest
- ProfileResponse
- ProfileUpdateRequest
- ProfileWriteResponse
- ProfilesListResponse
- PublicPlatformInput
- PublicPlatformOutput
- ThreadsSettings
- TikTokSettings
- XSettings
- YouTubeSettings
- YouTubeSettingsTags
Documentation For Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2f18606b0248dcaa7bc02a203637543c781e51ff1de84d35bc685b5f6401051
|
|
| MD5 |
3635424e7c116d9fd050fe87b8da1684
|
|
| BLAKE2b-256 |
6a06cd56a2d4b52242775158893c8e5e57efab9bbe25214ca66d51f50caf8a78
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
541be90172e917b60aebfb9c25ebb13faf35eabe68b056c3fad514a6b6ab70c3
|
|
| MD5 |
912fc200f0c1a98eb7268c3f0843a458
|
|
| BLAKE2b-256 |
fd277c4eddce0ad5837de3aca150e71384002701c52606a0347ca7496e690efc
|