1. SDK
PRAEMUNIO API
  • Praemunio API - v1
  • Praemunio SDK
  • AUTHENTICATION
    • API KEY Authentification
      POST
    • Refresh API
      POST
  • CORE
    • Teams
      • Members
        • Get Team Members
        • Add Team Member
        • Add Team Member Copy
      • Get Account Teams
      • Create Team
      • Get Team Details
      • Update Team Data
      • Delete Team
      • Get Team Data
      • Get Team workspaces
      • Get Team logs
    • Workspaces
      • Get Account Drive
      • Get Workspaces By Team
      • Create New Workspace
      • Get Workspace Details
      • Get Team Workspaces
      • Update workspace
      • Delete workspace
    • Folders
      • Get Folders
      • Create Folder
      • Get Folder Details
      • Get Folder Content
      • Update Folder
      • Delete Folder
      • Move Folder
    • Documents
      • Get Document Info
      • Get Document By Workspace
      • Update Document
      • Delete Document
      • Archive Document
      • Restore Document
      • Move Document
      • Stream Document
      • Stream Document Copy
      • Upload Document
  • SDK
    • Typescript
    • Rust
    • Python
    • PHP
    • GO
  1. SDK

Python

Praemunio Python SDK#

Official Python client for the Praemunio API.

Installation#

Quick Start#

1. Get Your API Keys#

Retrieve your keys from the Praemunio Dashboard:
Public Key: pk_test_... (sandbox) or pk_live_... (production)
Secret Key: sk_test_... (sandbox) or sk_live_... (production)

2. Initialize the Client#

3. Authenticate#

4. First API Call#

5. Complete Example#

API Reference#

Workspaces API#

Access via client.workspaces

list(team_id: str = None)#

List all workspaces, optionally filtered by team.
ParameterTypeRequiredDescription
team_idstrNoFilter by team ID
Returns: object (response with success, message, result)

drive()#

Get the drive (root folders) for the authenticated user.

teams(team_id: str = None)#

Get teams associated with workspaces.

details(workspace_id: str = None)#

Get workspace details.
ParameterTypeRequiredDescription
workspace_idstrNoWorkspace ID

create(workspace_create_request)#

Create a new workspace.
ParameterTypeRequiredDescription
namestrYesWorkspace name
descriptionstrYesWorkspace description
team_idstrYesTeam ID to associate

update(workspace_update_request)#

Update a workspace.

delete(workspace_delete_request)#

Delete a workspace.

Teams API#

Access via client.teams

list()#

List all teams.

dashboard()#

Get teams dashboard data.

info(body=None, team_id=None)#

Get team information.

workspaces(team_id: str = None)#

Get workspaces associated with teams.

logs(team_id=None, page=None, limit=None)#

Get team logs.

create(team_create_request)#

Create a new team.
ParameterTypeRequiredDescription
namestrYesTeam name
descriptionstrNoTeam description
typestrYesindividual or legal_entity

update(team_update_request)#

Update a team.

delete(team_delete_request)#

Delete a team.

Teams Members API#

Access via client.teams_members

list(team_id: str = None, page: int = None, limit: int = None)#

List team members with pagination.
ParameterTypeRequiredDescription
team_idstrNoTeam ID
pageintNoPage number (default: 1)
limitintNoItems per page (default: 10)

add(team_member_add_request)#

Add a member to a team.
ParameterTypeRequiredDescription
team_idstrYesTeam ID
emailstrYesMember email

Folders API#

Access via client.folders

list(workspace_id: str)#

List folders in a workspace.
ParameterTypeRequiredDescription
workspace_idstrYesWorkspace ID

content(folder_id=None)#

Get folder content.

details(folder_id: str = None)#

Get folder details.

create(folder_create_request)#

Create a new folder.
ParameterTypeRequiredDescription
workspace_idstrYesWorkspace ID
namestrYesFolder name
descriptionstrNoFolder description
parent_folder_idstrNoParent folder ID

update(folder_update_request)#

Update a folder.

move(folder_delete_request)#

Move a folder.

delete(folder_delete_request)#

Delete a folder.

Documents API#

Access via client.documents

list(workspace_id: str = None)#

List documents in a workspace.

details(document_id: str = None)#

Get document details.

upload(workspace_id=None, folder_id=None, file1=None, file2=None)#

Upload a document.
ParameterTypeRequiredDescription
workspace_idstrNoWorkspace ID
folder_idstrNoFolder ID
file1bytesNoFile (primary)
file2bytesNoFile (secondary)

stream(body, document_id=None)#

Stream a document.

archive(document_archive_request)#

Archive a document.
ParameterTypeRequiredDescription
document_idstrYesDocument ID
reasonstrNoArchive reason

restore(document_restore_request)#

Restore an archived document.

move(document_move_request)#

Move a document.

update(document_update_request)#

Update a document.

delete(document_delete_request)#

Delete a document.

Authentication#

Initial Authentication#

Automatic Token Refresh#

The SDK automatically handles token refresh. You can also force it manually:

Manual Token Management#

Environments#

EnvironmentURLUsage
Sandboxhttps://sandbox-api.praemunio.org/api/v1Testing and development
Livehttps://api.praemunio.org/api/v1Production

Error Handling#

Python 3.11+#

The SDK supports Python 3.11 and later versions.

Documentation#

Official Documentation
API Reference
Authentication Guide

Support#

🐛 Report a Bug
📧 Email
Modified at 2026-11-24 13:52:55
Previous
Rust
Next
PHP
Built with