A previous release had provenance metadata, but this release does not. View details.
mymarky
Typed Python client for the Marky REST API. Python 3.11+.
pip install mymarky
import os
from mymarky import Marky, NotFoundError
from mymarky.generated.api.businesses import get_workspace, list_workspaces
from mymarky.generated.api.integrations import list_connected_social_accounts
from mymarky.generated.api.posts import create_post, delete_post, get_post
from mymarky.generated.models import PostCreateRequest, PostResponse
workspace_id = os.environ["MARKY_WORKSPACE_ID"]
with Marky(api_key=os.environ["MARKY_API_KEY"]) as marky:
workspaces = list(marky.paginate(list_workspaces.sync))
workspace = get_workspace.sync(workspace_id, client=marky.client)
accounts = list_connected_social_accounts.sync(workspace_id, client=marky.client)
# A draft: status NEW and no scheduled_publish_time, so nothing is published.
draft = create_post.sync(
workspace_id,
client=marky.client,
body=PostCreateRequest(caption="Hello from the SDK", status="NEW"),
)
assert isinstance(draft, PostResponse)
post = get_post.sync(workspace_id, draft.id, client=marky.client)
delete_post.sync(workspace_id, draft.id, client=marky.client)
try:
get_post.sync(workspace_id, draft.id, client=marky.client)
except NotFoundError as err:
print(err.status, err.code) # 404 resource_not_found
That flow is our release smoke test, run end to end against the live API. To
schedule instead of drafting, send status="SCHEDULED" with a future
scheduled_publish_time, or call schedule_post later.
Every operation lives in mymarky.generated.api.<tag>.<operation> with
sync, sync_detailed, asyncio and asyncio_detailed variants; pass
client=marky.client.
Workspace operations (list_workspaces, get_workspace, create_workspace,
update_workspace, delete_workspace) live in the businesses tag module.
Routes inside a workspace keep their /api/businesses/{business_id}/... path,
so their first argument is named business_id: pass the workspace ID.
- Errors: any non-2xx raises an
ApiErrorsubclass (NotFoundError,RateLimitError, ...). Branch onerr.code, never on the message. So asynccall returns the success model (typedPostResponse | None, whereNonemeans a 2xx status the spec does not list). - IDs are strings: path IDs take the same
strthe API returns in.id(since 0.1.1; 0.1.0 typed most of them asuuid.UUID). - Retries: 429s, and 5xx/network errors on requests that are safe to repeat.
Create calls get an
Idempotency-Keyautomatically, so a retry never makes a duplicate. Passidempotency_key=to make your own retries safe too. - Unknown values: enums are plain strings, so a new status or platform never
breaks parsing; unknown fields land in
.additional_properties. - Renamed "business" to "workspace":
list_businesses,get_business,create_business,update_business,delete_businessand thebusiness_idfield on media upload bodies still work but are deprecated; use the*_workspace(s)functions andworkspace_id. - Webhooks:
construct_event(raw_body, request.headers, secret)checks theX-Marky-SignatureHMAC over"{X-Marky-Timestamp}." + raw body, rejects deliveries older than 5 minutes (replays), and returns the event.
Metadata
Release files for mymarky 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mymarky-0.1.1.tar.gz | 221.8 kB | Without provenance | Details for mymarky-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mymarky-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mymarky-0.1.1-py3-none-any.whl |
Total release size: 735.2 kB
Release files / mymarky-0.1.1.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | mymarky-0.1.1.tar.gz |
|---|---|
| Size | 221.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
570cbdc9e1403cfad57320877347ce613b809e5cf208aaff156dd8796e84beea
|
|
BLAKE2b-256 checksum How to use checksums |
875cfb1151d5031b367f58aba2a5b694c4b84685ec25173dc6beee427e8ac2f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / mymarky-0.1.1-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | mymarky-0.1.1-py3-none-any.whl |
|---|---|
| Size | 513.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f012b3c3ae7d5d9e21ecddeb812e3c02fa7fc384675c495dcc20cdf15b87009
|
|
BLAKE2b-256 checksum How to use checksums |
7fa6229e541ad82fb5aff39456942896fabf0041ddbad26988f92bc436ca1af2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for mymarky 0.1.1
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.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 0.1.0 2 files With provenance
- Added 0.1.1 2 files Without provenance
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.