myleadcli


Namemyleadcli JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/ikosmala/mylead-cli
Summary
upload_time2024-01-26 14:57:09
maintainer
docs_urlNone
authorIwo
requires_python>=3.11,<4.0
licenseMIT
keywords test dependencies documentation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
  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:

```bash
myleadcli YOUR_API_KEY
```

For charts

```bash
myleadcli YOUR_API_KEY --charts
```

For more information use:

```bash
myleadcli --help
```

## Features

- [x] Charts for data not available in MyLead dashboard
- [x] Presenting data in tables
- [x] Async support for best performance
- [x] 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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ikosmala/mylead-cli",
    "name": "myleadcli",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "test,dependencies,documentation",
    "author": "Iwo",
    "author_email": "kosmala.iwo@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/03/f7/5f1c71f120f8718cee991bc2e172af60b896b53778b6145ae405192c4a4f/myleadcli-0.1.3.tar.gz",
    "platform": null,
    "description": "# myleadcli - CLI tool for MyLead API\n\nThis 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.\n\nThe data presented by this tool is not available in the standard MyLead dashboard.\n\nIt'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.\n\n**No data is send to third parties.**\n\n## Performance\n\n**Due to API rate limiting, the maximum fetching speed from the API is restricted to 10,000 leads per 60 seconds**\n\n### Examples\n\nFetching and processing up to 10,000 leads takes approximately 1.5 seconds.\n\nFetching and processing one million leads from file takes only 40sec.\nFetching same amount from API would rougly take 1h 40min.\n\nThe 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.\n\n## Installation\n\nInstall with pip\n\n```bash\n  pip install myleadcli\n```\n\n## Environment Variables\n\nYou can provide your API_KEY as environment variables to your .env file or just paste it as argument in command line.\n\nYou can get your API_KEY here: https://mylead.global/panel/api\n\n```\nAPI_KEY=YOUR_API_KEY_FROM_MYLEAD_DASHBOARD\n```\n\n## Usage/Examples\n\nTo fetch and present data in tables for leads from last 365 days use:\n\n```bash\nmyleadcli YOUR_API_KEY\n```\n\nFor charts\n\n```bash\nmyleadcli YOUR_API_KEY --charts\n```\n\nFor more information use:\n\n```bash\nmyleadcli --help\n```\n\n## Features\n\n- [x] Charts for data not available in MyLead dashboard\n- [x] Presenting data in tables\n- [x] Async support for best performance\n- [x] Utilize categorical data types in Pandas to achieve improved memory usage (resulting in a 45% reduction with real data)\n- [ ] Mean/Max/Min/Avg statistics\n- [ ] More flexibility with file saving/reading\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/ikosmala/mylead-cli",
        "Repository": "https://github.com/ikosmala/mylead-cli"
    },
    "split_keywords": [
        "test",
        "dependencies",
        "documentation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "65a82e43a43b2130ecfb2730925da24351c03c88d45c58c5a42ea59fa9d86377",
                "md5": "dd74a16ec42721421e69f9ed8f305a5a",
                "sha256": "ead1a80bf6c336996ab438cbf4395037b75c9cc87b2d80fcc32635ff7d9a86a3"
            },
            "downloads": -1,
            "filename": "myleadcli-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dd74a16ec42721421e69f9ed8f305a5a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 13978,
            "upload_time": "2024-01-26T14:57:07",
            "upload_time_iso_8601": "2024-01-26T14:57:07.943756Z",
            "url": "https://files.pythonhosted.org/packages/65/a8/2e43a43b2130ecfb2730925da24351c03c88d45c58c5a42ea59fa9d86377/myleadcli-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "03f75f1c71f120f8718cee991bc2e172af60b896b53778b6145ae405192c4a4f",
                "md5": "c65a110ad5608a5feabd10ee0f4b625e",
                "sha256": "08a777e48f1e1c2fea8a3f1a55e5bdbbc42d5cb028fb7b48a522d1f10a11d509"
            },
            "downloads": -1,
            "filename": "myleadcli-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c65a110ad5608a5feabd10ee0f4b625e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 11606,
            "upload_time": "2024-01-26T14:57:09",
            "upload_time_iso_8601": "2024-01-26T14:57:09.637278Z",
            "url": "https://files.pythonhosted.org/packages/03/f7/5f1c71f120f8718cee991bc2e172af60b896b53778b6145ae405192c4a4f/myleadcli-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-26 14:57:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ikosmala",
    "github_project": "mylead-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "myleadcli"
}
        
Iwo
Elapsed time: 0.17886s