Skip to main content

Peerdom's Python api wrapper developed by Peerdom

Project description

PeerdomClient

PeerdomClient is a Python client for interacting with the Peerdom API, which allows organizations to manage their data within Peerdom. This client provides a convenient way to access and perform CRUD operations on peers, roles, and circles through a simple interface.

Installation

You can install the PeerdomClient using pip:

pip install peerdomclient

Usage

To use the PeerdomClient, you need to obtain an API key from Peerdom. Once you have the API key, you can instantiate the client and start making API calls.

Here's an example of how to use the PeerdomClient:

from peerdomclient import PeerdomClient

# Initialize the client
api_key = "your-api-key"
client = PeerdomClient(api_key)

# Get a list of peers
peers = client.get_peers(limit=10)
for peer in peers:
    print(peer)

# Get details of a specific peer
peer_id = "123" #replace with a peer id
peer = client.get_peer(peer_id)
print(peer)

# Create a new peer
new_peer = client.create_peer(first_name="John", last_name="Doe", birthdate="1990-01-01")
print(new_peer)

# Update an existing peer
peer_id = new_peer["id"]
updated_peer = client.update_peer(peer_id=peer_id, first_name="Jane", last_name="Doe", birthdate="1990-01-01")
print(updated_peer)

# Delete a peer
client.delete_peer(peer_id)
print("Peer deleted.")

Replace "your-api-key" with your actual API key and "peer-id" with the ID of the peer you want to retrieve, update, or delete.

Documentation

For more details on the available methods and parameters, please refer to the API documentation.

Contributing

Contributions to the PeerdomClient are welcome! If you find a bug, have a suggestion, or want to contribute code improvements, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License.

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

peerdomclient-0.1.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

peerdomclient-0.1.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file peerdomclient-0.1.1.tar.gz.

File metadata

  • Download URL: peerdomclient-0.1.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.0 Linux/6.2.0-1016-azure

File hashes

Hashes for peerdomclient-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dc4f3ccdce0060acb8c43e3e6cdc82865cf199e9967760eef53bcda2c5884fcc
MD5 895aeab7ccf3088ffbc067ff7b16a1fc
BLAKE2b-256 790b2c55d5ebe44a036bc3b4edd1c15f03e372dd07b350a0c8db22540f8f98e3

See more details on using hashes here.

File details

Details for the file peerdomclient-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: peerdomclient-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.0 Linux/6.2.0-1016-azure

File hashes

Hashes for peerdomclient-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 facd995c73208c5cebeec2611a31f808c34b062a98b94fc3cbd3fdfd031e1eaf
MD5 ea44125b0ede31f88a299e7dcfc8d8f5
BLAKE2b-256 e5b02529541265da9e22797932ef3c855736738c8309b7397517b6fc6d914fc8

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