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.
Quickly set up workflows for retrieving hard-to-find contact information and composing personalized messages based on any data point.
ContactMagic is a wrapper around Copyfactory and SalesScrapers to build programmatic workflows that enrich contact data and create personalized and engaging messaging.
With ContactMagic, you can programmatically:
ContactMagic was designed with concurrency in mind. All operations make use of Asyncio to accelerate the process. You can set the number of concurrent workers in the settings.
Before installing, you should also ensure that you have a registered account with Copyfactory and SalesScrapers as API keys for both services is required.
There is no need for you to handle rate limits (429
HTTP status error). The library handles rate limits automatically.
A 'SETTINGS' variable is exposed from the settings.py
file which reads from your environment to set API key values.
Here are the current settings you should have in your .env file or environment.
COPYFACTORY_API_KEY=''
SALES_SCRAPERS_API_KEY=''
MASTERSHEET_URL=''
GOOGLE_PROJECT_ID=''
GOOGLE_PRIVATE_KEY_ID=''
GOOGLE_PRIVATE_KEY=''
GOOGLE_CLIENT_ID=''
GOOGLE_CLIENT_EMAIL=''
TIMEZONE="America/New_York"
# list and dict are parsed as JSON.
ALLOWED_SCRAPER_NAMES='["get-case-study", "get-company-achievement", "get-company-description", "get-company-announcement", "FALLBACK", "search-google"]'
MAX_WORKERS='5' # Number of concurrent workers to process. 5-10 is likely enough.
If you are not using the agency workflows and just want to use the underlying PersonalizationSetttings objects you only need to set the following environment variables.
COPYFACTORY_API_KEY=''
SALES_SCRAPERS_API_KEY=''
# Optional since has default value
ALLOWED_SCRAPER_NAMES='["get-case-study", "get-company-achievement", "get-company-description", "get-company-announcement", "FALLBACK", "search-google"]'
# Optional since has default value
MAX_WORKERS='5'
The core underlying model you will be using is 'PersonalizationSettings' which is responsible for understanding what you want to scrape and how you want to personalize.
from contact_magic import PersonalizationSettings
import pandas as pd
data = [
{
# name this column anything you want
"col_name": "personalized_field1",
# If the first scraper returns nothing, will iterate through list until a successful scrape is complete.
"allowed_scrapers": [
{
"scraper_name": "get-case-study", # endpoint for SalesScrapers
"premise_url": "https://app.copyfactory.io/profiles/1065/premises/7478/" # Copyfactory premise url
},
{
"scraper_name": "another-scraper",
"premise_url": "https://app.copyfactory.io/profiles/1065/premises/7478/"
}
],
}, ...
]
# Set the datapoints. Notice how it's a list? This means you can generate as many personalized sentences as you want.
settings = PersonalizationSettings(datapoints=data)
dataframe = pd.read_csv("my_csv_file.csv")
# Run the settings against the DataFrame
personalized_dataframe = settings.process_from_dataframe(dataframe)
What happens when we run process_from_dataframe
?
FAQs
Quickly set up workflows for retrieving hard-to-find contact information and composing personalized messages based on any data point.
We found that contact-magic 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.