Skip to main content

Ploomes API Python Client

This package provides a simple Python client for interacting with the Ploomes API, designed with rate-limiting and exponential backoff strategies for improved resilience.

Installation

You can install the package from PyPI:

pip install ploomes-api-client

Basic Usage

Contact Management

To manage contacts, first import the necessary classes and initialize them:

from ploomes_client import PloomesClient as Ploomes
from ploomes_client.collections.contacts import Contacts

Initialize PloomesClient and Contacts Class

ploomes = Ploomes(api_key='your_api_key_here')
contacts = Contacts(ploomes)

Creating a New Contact with Expanded Fields

Here is a synthetic example to demonstrate how to create a new contact with expanded Phones and OtherProperties:

# Define the payload for the new contact
payload = {
    "Name": "Jane Doe",
    "Email": "janedoe@example.com",
    "Phones": [
        {"PhoneNumber": "1234567890", "Type": "Mobile"}
    ],
    "OtherProperties": {"FavoriteColor": "Blue", "Occupation": "Engineer"}
}

# Create the contact
response_json = contacts.post_contact(payload, expand="Phones,OtherProperties")

In this example, the post_contact method sends a POST request to create a new contact in Ploomes. The payload dictionary contains the data for the new contact, including fields like Name, Email, Phones, and OtherProperties. We also use the expand parameter to expand the Phones and OtherProperties fields.

By default, the post_contact method will return a JSON-formatted string as the response.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Uploading to PyPI with Two-Factor Authentication

  1. Generate an API token for your PyPI account:

    • Go to the PyPI account settings page and log in.
    • Scroll down to the "API Tokens" section and click "Add API Token."
    • Provide a description for the token and click "Generate."
    • Copy the generated token.
  2. Upload your package using the API token:

    • Open your terminal.

    • Navigate to your package directory.

    • Build the distribution files:

      python setup.py sdist bdist_wheel
      
    • Upload the distribution files using the twine tool and the generated API token:

      twine upload --verbose dist/* -u __token__ -p <API_TOKEN>
      

    Replace <API_TOKEN> with the copied API token.

  3. Verify the upload:

    • Check the PyPI project page to ensure your new version is listed.

Release files for ploomes-api-client 0.2.151

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ploomes-api-client 0.2.151
File Size Uploaded
ploomes_api_client-0.2.151.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ploomes-api-client 0.2.151
File Interpreter ABI Platform
ploomes_api_client-0.2.151-py3-none-any.whl Python 3 none any Details

Total release size: 44.7 kB

Release files / ploomes_api_client-0.2.151.tar.gz

Download URL ploomes_api_client-0.2.151.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e92468943e2d53c4020da3484098001ebd9353c47a73f2a4c8def19af7127c6f
BLAKE2b-256 checksum
How to use checksums
e6364bfc5d2e07ce86501e5f5dec6b9710eaafac5f6de1cb110abdcf3362b4a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release files / ploomes_api_client-0.2.151-py3-none-any.whl

Download URL ploomes_api_client-0.2.151-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d4b29d94448ecd4f828a3f3d725a2ca263eca15a748911a713469fe87a84d08
BLAKE2b-256 checksum
How to use checksums
42da5843ae3e37e5aca348c67ed304c2bff67b9c5c8194bac639fc135370e944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release history Release notifications | RSS feed

This release

0.2.151 This release

2 release files

0.2.96

2 release files

0.2.95

2 release files

0.2.94

2 release files

0.2.93

2 release files

0.2.92

2 release files

0.2.91

2 release files

0.2.90

2 release files

0.2.89

2 release files

0.2.88

2 release files

0.2.87

2 release files

0.2.86

2 release files

0.2.85

2 release files

0.2.84

2 release files

0.2.83

2 release files

0.2.82

2 release files

0.2.81

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.27

2 release files

0.1.26

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page