klyne


Nameklyne JSON
Version 0.1.95 PyPI version JSON
download
home_pageNone
SummaryLightweight Python package analytics SDK
upload_time2025-08-21 15:18:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT
keywords analytics metrics package telemetry
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Klyne Python SDK

[![PyPI version](https://badge.fury.io/py/klyne.svg)](https://badge.fury.io/py/klyne)
[![Python Support](https://img.shields.io/pypi/pyversions/klyne.svg)](https://pypi.org/project/klyne/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Lightweight Python package analytics SDK for [Klyne](https://klyne.dev). Track package usage, Python version adoption, OS distribution, and more with minimal overhead.

## Features

- =� **Lightweight**: Zero dependencies, uses only Python standard library
- � **Non-blocking**: Asynchronous data transmission in background threads
- = **Privacy-first**: No PII collection, only aggregated usage metrics
- =� **Robust**: Graceful error handling and automatic retries
- =� **Rich insights**: Python versions, OS distribution, environment detection
- <� **Simple API**: One-line integration with sensible defaults

## Installation

```bash
pip install klyne
```

## Quick Start 💨

```python
import klyne

# Initialize once in your package
klyne.init(
    api_key="klyne_your_api_key_here",
    project="your-package-name",
    package_version="1.0.0"
)

# That's it! Analytics are automatically collected
```

## What Gets Tracked

The SDK automatically collects:

- **Python Environment**: Version, implementation (CPython/PyPy)
- **Operating System**: Type, version, architecture
- **Installation Context**: pip/conda, virtual environment detection
- **Hardware**: CPU count, memory (rounded for privacy)
- **Package Info**: Name, version, entry points used

**No personally identifiable information is collected.**

## Advanced Usage

### Custom Event Tracking (coming soon)

```python
import klyne

# Track specific functions or features
klyne.track_event(
    entry_point="advanced_feature",
    extra_data={"mode": "premium", "user_type": "enterprise"}
)
```

### Configuration Options

```python
import klyne

klyne.init(
    api_key="klyne_your_api_key_here",
    project="your-package-name",
    package_version="1.0.0",
    base_url="https://www.klyne.dev",  # Default API URL
    enabled=True,                      # Enable/disable analytics
    debug=False                        # Debug logging
)
```

### Environment-based Control

```python
import os
import klyne

# Disable in development
enabled = os.getenv("ENVIRONMENT") == "production"

klyne.init(
    api_key=os.getenv("KLYNE_API_KEY"),
    project="your-package-name",
    enabled=enabled
)
```

### Manual Control

```python
import klyne

# Disable analytics
klyne.disable()

# Re-enable analytics
klyne.enable()

# Check status
if klyne.is_enabled():
    print("Analytics are active")

# Flush pending events (useful for short-lived scripts)
klyne.flush(timeout=5.0)
```

## Requirements

- Python 3.7+
- No external dependencies
- Internet connection (for sending analytics)

## License

MIT License

---

**[Get your free API key at klyne.dev](https://klyne.dev)**

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "klyne",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "analytics, metrics, package, telemetry",
    "author": null,
    "author_email": "Klyne Team <hello@klyne.dev>",
    "download_url": "https://files.pythonhosted.org/packages/8a/f7/60c4577b5c3d173908e41a98f822fba550591b8753531fed12331b5ffe15/klyne-0.1.95.tar.gz",
    "platform": null,
    "description": "# Klyne Python SDK\n\n[![PyPI version](https://badge.fury.io/py/klyne.svg)](https://badge.fury.io/py/klyne)\n[![Python Support](https://img.shields.io/pypi/pyversions/klyne.svg)](https://pypi.org/project/klyne/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nLightweight Python package analytics SDK for [Klyne](https://klyne.dev). Track package usage, Python version adoption, OS distribution, and more with minimal overhead.\n\n## Features\n\n- =\ufffd **Lightweight**: Zero dependencies, uses only Python standard library\n- \ufffd **Non-blocking**: Asynchronous data transmission in background threads\n- =\u0012 **Privacy-first**: No PII collection, only aggregated usage metrics\n- =\ufffd\u000f **Robust**: Graceful error handling and automatic retries\n- =\ufffd **Rich insights**: Python versions, OS distribution, environment detection\n- <\ufffd **Simple API**: One-line integration with sensible defaults\n\n## Installation\n\n```bash\npip install klyne\n```\n\n## Quick Start \ud83d\udca8\n\n```python\nimport klyne\n\n# Initialize once in your package\nklyne.init(\n    api_key=\"klyne_your_api_key_here\",\n    project=\"your-package-name\",\n    package_version=\"1.0.0\"\n)\n\n# That's it! Analytics are automatically collected\n```\n\n## What Gets Tracked\n\nThe SDK automatically collects:\n\n- **Python Environment**: Version, implementation (CPython/PyPy)\n- **Operating System**: Type, version, architecture\n- **Installation Context**: pip/conda, virtual environment detection\n- **Hardware**: CPU count, memory (rounded for privacy)\n- **Package Info**: Name, version, entry points used\n\n**No personally identifiable information is collected.**\n\n## Advanced Usage\n\n### Custom Event Tracking (coming soon)\n\n```python\nimport klyne\n\n# Track specific functions or features\nklyne.track_event(\n    entry_point=\"advanced_feature\",\n    extra_data={\"mode\": \"premium\", \"user_type\": \"enterprise\"}\n)\n```\n\n### Configuration Options\n\n```python\nimport klyne\n\nklyne.init(\n    api_key=\"klyne_your_api_key_here\",\n    project=\"your-package-name\",\n    package_version=\"1.0.0\",\n    base_url=\"https://www.klyne.dev\",  # Default API URL\n    enabled=True,                      # Enable/disable analytics\n    debug=False                        # Debug logging\n)\n```\n\n### Environment-based Control\n\n```python\nimport os\nimport klyne\n\n# Disable in development\nenabled = os.getenv(\"ENVIRONMENT\") == \"production\"\n\nklyne.init(\n    api_key=os.getenv(\"KLYNE_API_KEY\"),\n    project=\"your-package-name\",\n    enabled=enabled\n)\n```\n\n### Manual Control\n\n```python\nimport klyne\n\n# Disable analytics\nklyne.disable()\n\n# Re-enable analytics\nklyne.enable()\n\n# Check status\nif klyne.is_enabled():\n    print(\"Analytics are active\")\n\n# Flush pending events (useful for short-lived scripts)\nklyne.flush(timeout=5.0)\n```\n\n## Requirements\n\n- Python 3.7+\n- No external dependencies\n- Internet connection (for sending analytics)\n\n## License\n\nMIT License\n\n---\n\n**[Get your free API key at klyne.dev](https://klyne.dev)**\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Lightweight Python package analytics SDK",
    "version": "0.1.95",
    "project_urls": {
        "Documentation": "https://www.klyne.dev/docs",
        "Homepage": "https://www.klyne.dev",
        "Issues": "https://github.com/psincraian/klyne/issues",
        "Repository": "https://github.com/psincraian/klyne"
    },
    "split_keywords": [
        "analytics",
        " metrics",
        " package",
        " telemetry"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4a3e369a32b60d3eee03c86b813c0e27ee6a1737903a2e3a76e5fe2ddb399be1",
                "md5": "ca0792fbc6ab8521ec4a20869fd5eefb",
                "sha256": "3b846cf96ca4e9e935463ce4fdacf7eacdd2d4ad545d765f55c844b5f9eb9db9"
            },
            "downloads": -1,
            "filename": "klyne-0.1.95-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ca0792fbc6ab8521ec4a20869fd5eefb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10093,
            "upload_time": "2025-08-21T15:18:50",
            "upload_time_iso_8601": "2025-08-21T15:18:50.312949Z",
            "url": "https://files.pythonhosted.org/packages/4a/3e/369a32b60d3eee03c86b813c0e27ee6a1737903a2e3a76e5fe2ddb399be1/klyne-0.1.95-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8af760c4577b5c3d173908e41a98f822fba550591b8753531fed12331b5ffe15",
                "md5": "bb75129876b7cf1f22dc48e8e0438570",
                "sha256": "6efa2b3567767d81f5255966c42edbea620728f2ad0fb54f17581137f41b43b4"
            },
            "downloads": -1,
            "filename": "klyne-0.1.95.tar.gz",
            "has_sig": false,
            "md5_digest": "bb75129876b7cf1f22dc48e8e0438570",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 11195,
            "upload_time": "2025-08-21T15:18:51",
            "upload_time_iso_8601": "2025-08-21T15:18:51.872795Z",
            "url": "https://files.pythonhosted.org/packages/8a/f7/60c4577b5c3d173908e41a98f822fba550591b8753531fed12331b5ffe15/klyne-0.1.95.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-21 15:18:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "psincraian",
    "github_project": "klyne",
    "github_not_found": true,
    "lcname": "klyne"
}
        
Elapsed time: 0.62264s