Skip to main content

No project description provided

Project description

myleadcli - CLI tool for MyLead API

This package provides a command-line tool for generating statistics and charts from the MyLead API. With it, you can easily retrieve data from the API, store it in a Pandas DataFrame, save it to a file, create a user-friendly CLI interface using Typer, and visualize the data using Plotly.

The data presented by this tool is not available in the standard MyLead dashboard.

It's built on an asynchronous foundation, utilizing the httpx library with HTTP/2 support, and further enhancing performance with orjson. Data integrity is ensured through validation with Pydantic.

No data is send to third parties.

Performance

Due to API rate limiting, the maximum fetching speed from the API is restricted to 10,000 leads per 60 seconds

Examples

Fetching and processing up to 10,000 leads takes approximately 1.5 seconds.

Fetching and processing one million leads from file takes only 40sec. Fetching same amount from API would rougly take 1h 40min.

The API rate limit acts as a bottleneck. Fortunately, in a typical scenario where a user has around 10,000 to 30,000 leads from the last 365 days, the process usually takes from 2 to 186 seconds.

Installation

Install with pip

  pip install myleadcli

Environment Variables

You can provide your API_KEY as environment variables to your .env file or just paste it as argument in command line.

You can get your API_KEY here: https://mylead.global/panel/api

API_KEY=YOUR_API_KEY_FROM_MYLEAD_DASHBOARD

Usage/Examples

To fetch and present data in tables for leads from last 365 days use:

myleadcli YOUR_API_KEY

For charts

myleadcli YOUR_API_KEY --charts

For more information use:

myleadcli --help

Features

  • Charts for data not available in MyLead dashboard
  • Presenting data in tables
  • Async support for best performance
  • Utilize categorical data types in Pandas to achieve improved memory usage (resulting in a 45% reduction with real data)
  • Mean/Max/Min/Avg statistics
  • More flexibility with file saving/reading

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myleadcli-0.1.3.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myleadcli-0.1.3-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file myleadcli-0.1.3.tar.gz.

File metadata

  • Download URL: myleadcli-0.1.3.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Windows/10

File hashes

Hashes for myleadcli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 08a777e48f1e1c2fea8a3f1a55e5bdbbc42d5cb028fb7b48a522d1f10a11d509
MD5 c65a110ad5608a5feabd10ee0f4b625e
BLAKE2b-256 03f75f1c71f120f8718cee991bc2e172af60b896b53778b6145ae405192c4a4f

See more details on using hashes here.

File details

Details for the file myleadcli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: myleadcli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Windows/10

File hashes

Hashes for myleadcli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ead1a80bf6c336996ab438cbf4395037b75c9cc87b2d80fcc32635ff7d9a86a3
MD5 dd74a16ec42721421e69f9ed8f305a5a
BLAKE2b-256 65a82e43a43b2130ecfb2730925da24351c03c88d45c58c5a42ea59fa9d86377

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page