Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This package provides a simple Python client for interacting with the Ploomes API, designed with rate-limiting and exponential backoff strategies for improved resilience.
You can install the package from PyPI:
pip install ploomes-api-client
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
ploomes = Ploomes(api_key='your_api_key_here')
contacts = Contacts(ploomes)
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.
Contributions are welcome! Please feel free to submit a Pull Request.
Generate an API token for your PyPI account:
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.
Verify the upload:
FAQs
Python client for the Ploomes API
We found that ploomes-api-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.