
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
churnzero-api-wrapper
Advanced tools
A python package that wraps ChurnZero's HTTP API for easier usage of their HTTP API.
This is a Python API wrapper for the ChurnZero HTTP API. It provides a convenient way to interact with the ChurnZero HTTP API platform. The following features are supported:
Other features may be supported in the future.
The wrapper only supports the HTTP API integrations documented on this page: ChurnZero HTTP API. REST features may be supported in the future.
Note: This is an unofficial API wrapper and is not affiliated with ChurnZero.
To install the ChurnZero Python API Wrapper, you can use pip:
pip install churnzero_api_wrapper
To use the ChurnZero Python API Wrapper, you need to import the HTTPClient
class from the package:
from churnzero_api_wrapper import HTTPClient
Next, you need to create an instance of the HTTPClient
class and provide your ChurnZero APP credentials:
client = HTTPClient(app_key='{app_key}', host = "https://{domain}.churnzero.net/i")
Your app key and domain can be found in the ChurnZero dashboard under Admin
-> Data
-> Application Keys
-> Application Key & HTTP API Endpoint
.
Once you have created the client, you can start making HTTP API requests. For example, to set an Account attribute:
account = {
"externalAccountID": "12345",
"attr{CustomAttribute1}": "Value1",
}
client.set_account_attributes(account)
To set a Contact attribute:
contact = {
"externalAccountID": "12345",
"externalContactID": "67890",
"attrFirstName": "Value1",
"attrLastName": "Value2",
}
client.set_contact_attributes(contact)
To track an event:
event = {
"externalAccountID": "12345",
"externalContactID": "67890",
"eventName": "EventName",
"description": "EventDescription",
"eventDate": "2021-01-01T00:00:00Z",
}
client.track_event(event)
To configure the logging level for the ChurnZero Python API Wrapper, you can use the logging
module in Python. Here's an example of how to set the log level to DEBUG
:
import logging
# Set the log level to DEBUG
logging.getLogger().setLevel(logging.DEBUG)
# Set the log level to INFO
logging.getLogger().setLevel(logging.INFO)
# Set the log level to WARNING
logging.getLogger().setLevel(logging.WARNING)
# Set the log level to ERROR
logging.getLogger().setLevel(logging.ERROR)
WARNING: note that setting the log level to
DEBUG
will expose theapp_key
to logs due to ChurnZero's HTTP API configuration. It is recommended to only use theDEBUG
log level for debugging purposes and not in production environments.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for more information.
FAQs
A python package that wraps ChurnZero's HTTP API for easier usage of their HTTP API.
We found that churnzero-api-wrapper 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.