Python client for the Ploomes API
Project description
Ploomes API Python Client
This package provides a simple Python client for the Ploomes API.
Installation
You can install the package from PyPI:
pip install ploomes-api-client
Usage
First, import the PloomesClient
class:
from ploomes_client import PloomesClient
Next, create an instance of the PloomesClient
class, passing your API key as a parameter:
ploomes = PloomesClient('your_api_key_here')
Now you can use the methods of the PloomesClient
class to interact with the API.
# Get user account
user_account = ploomes.get_user_account()
# Create a contact
response = ploomes.create_contact(
Name='John Doe',
Email='johndoe@example.com',
City='City',
State='State',
StreetAddress='Street Address',
Neighborhood='Neighborhood',
ZipCode='ZipCode',
Register='Register',
StreetAddressNumber='StreetAddressNumber',
Phones=[{'PhoneNumber': '1234567890'}],
OtherProperties={'Property': 'Value'}
)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Uploading to PyPI with Two-Factor Authentication
If you're encountering the "two factor auth enabled" error while trying to upload your Python package to PyPI, follow these steps to resolve the issue.
-
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.
-
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 victorfigueredo -p <API_TOKEN>
Replace
<API_TOKEN>
with the copied API token. -
-
Verify the upload:
- Check the PyPI project page to ensure your new version is listed.
By following these steps, you'll be able to upload your package to PyPI successfully even with two-factor authentication enabled.
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
Hashes for ploomes-api-client-0.1.24.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd71a0963bc437e9a8ac5cf8e2b7c3733680e1f96801568bf590d1abe4bbde60 |
|
MD5 | 2311ee5f519093e7f9e86c538366fe36 |
|
BLAKE2b-256 | c58db366e9c23b31801f2894706dcd7da8c300a86df0b11a6f37db98340e3e42 |
Hashes for ploomes_api_client-0.1.24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35a30807ceeeb1c9f4f9bba766e4ef11dc9d4a3b1522cee02fe343971307c7e1 |
|
MD5 | a0b83d563d697d1ffe29b28745e21610 |
|
BLAKE2b-256 | 4a607a7d2d9305cb11d5670d2114c80011d4e9ac9c440037665c4c1c61690ce9 |