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.0.tar.gz (11.4 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.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for myleadcli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83b42e5db8e836871f5f9284dd5fa3fff60e3045fe07c3b6284d469c9a623ea9
MD5 cd3f3d3346aabb91ffc6ce7767ac66cc
BLAKE2b-256 9f3af9da1b4dd227b75385d382a2e3eb854a6ff8d09fab6e5b114b77ead0501e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for myleadcli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d60bbc3311cbb19a018a2109ad0990873ed7311f4828b50e0e7ede6b73445f8
MD5 31da7d7c90b40489f70753b1cfeb2e96
BLAKE2b-256 531fdf21cf3f2151810d3caafc44f1724cab2039ad6c5d1fb9b565c5d9f1bba2

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