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
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 peerdomclient-0.0.0.tar.gz.
File metadata
- Download URL: peerdomclient-0.0.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b96e1df5f33c855bfc524474bf97f6b104c5d92abafbc893333658a527c5fff8
|
|
| MD5 |
8abb0481ee6f0c5c2a815e82d1a91d22
|
|
| BLAKE2b-256 |
4df4437039b5e49f19d42f8dae9fbb0a3e1ef1f88269348a4a0c5b8ff9056764
|
File details
Details for the file peerdomclient-0.0.0-py3-none-any.whl.
File metadata
- Download URL: peerdomclient-0.0.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6e4f8c3b9b5ebb69c4df27e453aba27bc01b9a4afd8a4cbf1db544907bec9ea
|
|
| MD5 |
617307cb11ef08d96c4cf8394d54b9b0
|
|
| BLAKE2b-256 |
17c8458cb126b6b3134a5a02679a18fca1b7f1e4287afbf93e62787235ee65ec
|