tamga


Nametamga JSON
Version 0.1.12 PyPI version JSON
download
home_pageNone
SummaryA modern, async-capable logging utility with multiple output formats and colorful console output
upload_time2025-02-09 17:39:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT
keywords logging async mongodb colorful console file json sql email
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tamga [![PyPI Downloads](https://static.pepy.tech/badge/tamga)](https://pepy.tech/projects/tamga)

A modern, logging utility for Python with multiple output formats and colorful console output.    

[![Installation](https://belg-api.vercel.app/badge/installation/pip3%20install%20tamga/neutral/dark)](https://pypi.org/project/tamga/)

tam·ga / noun      
An ancient Turkic symbol or seal used for marking ownership, identity, or lineage.

<img alt="Terminal" src="https://github.com/DogukanUrker/Tamga/blob/main/Images/terminal.png?raw=true" />


## Features

- 🎨 Colorful console output using Tailwind CSS color palette
- 📁 File logging with rotation and backup
- 📊 JSON logging with size limits and backup
- 🗄️ SQLite database logging
- 🚀 MongoDB integration
- 📧 Email notifications for specific log levels
- 🌐 API logging support
- 🔄 Automatic file rotation and backup
- 🎯 Multiple log levels with customizable colors

## Installation

```bash
pip install tamga
```

## Quick Start

```python
from tamga import Tamga

# Initialize the logger
logger = Tamga(
    logToFile=True,
    logToJSON=True,
    logToConsole=True
)

# Basic logging
logger.info("This is an info message")
logger.warning("This is a warning")
logger.error("This is an error")
logger.success("This is a success message")
logger.debug("This is a debug message")
logger.critical("This is a critical message")

# Custom logging
logger.custom("This is a custom message", "CUSTOM", "orange")
```

## Advanced Usage

### MongoDB Integration

```python
logger = Tamga(
    logToMongo=True,
    mongoURI="your_mongodb_uri",
    mongoDatabaseName="logs_db",
    mongoCollectionName="application_logs"
)
```

### Email Notifications

```python
logger = Tamga(
    sendMail=True,
    smtpServer="smtp.gmail.com",
    smtpPort=587,
    smtpMail="your_email@gmail.com",
    smtpPassword="your_password",
    smtpReceivers=["receiver@email.com"],
    mailLevels=["CRITICAL", "ERROR"]
)
```

### File Rotation and Backup

```python
logger = Tamga(
    logToFile=True,
    logToJSON=True,
    maxLogSize=10,  # MB
    maxJsonSize=10,  # MB
    enableBackup=True
)
```

### API Integration

```python
logger = Tamga(
    logToAPI=True,
    apiURL="http://your-api.com/logs"
)
```

## Available Log Levels

- INFO (sky blue)
- WARNING (amber)
- ERROR (rose)
- SUCCESS (emerald)
- DEBUG (indigo)
- CRITICAL (red)
- DATABASE (green)
- MAIL (neutral)
- METRIC (cyan)
- TRACE (gray)
- Custom (user-defined)

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Author

- Doğukan Ürker
- Email: dogukanurker@icloud.com
- GitHub: [@dogukanurker](https://github.com/dogukanurker) 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tamga",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "logging, async, mongodb, colorful, console, file, json, sql, email",
    "author": null,
    "author_email": "Do\u011fukan \u00dcrker <dogukanurker@icloud.com>",
    "download_url": "https://files.pythonhosted.org/packages/02/2f/f75520b31a70b059330e4ff374801c7b86dab7d79b63af9b69ecf0647259/tamga-0.1.12.tar.gz",
    "platform": null,
    "description": "# Tamga [![PyPI Downloads](https://static.pepy.tech/badge/tamga)](https://pepy.tech/projects/tamga)\n\nA modern, logging utility for Python with multiple output formats and colorful console output.    \n\n[![Installation](https://belg-api.vercel.app/badge/installation/pip3%20install%20tamga/neutral/dark)](https://pypi.org/project/tamga/)\n\ntam\u00b7ga / noun      \nAn ancient Turkic symbol or seal used for marking ownership, identity, or lineage.\n\n<img alt=\"Terminal\" src=\"https://github.com/DogukanUrker/Tamga/blob/main/Images/terminal.png?raw=true\" />\n\n\n## Features\n\n- \ud83c\udfa8 Colorful console output using Tailwind CSS color palette\n- \ud83d\udcc1 File logging with rotation and backup\n- \ud83d\udcca JSON logging with size limits and backup\n- \ud83d\uddc4\ufe0f SQLite database logging\n- \ud83d\ude80 MongoDB integration\n- \ud83d\udce7 Email notifications for specific log levels\n- \ud83c\udf10 API logging support\n- \ud83d\udd04 Automatic file rotation and backup\n- \ud83c\udfaf Multiple log levels with customizable colors\n\n## Installation\n\n```bash\npip install tamga\n```\n\n## Quick Start\n\n```python\nfrom tamga import Tamga\n\n# Initialize the logger\nlogger = Tamga(\n    logToFile=True,\n    logToJSON=True,\n    logToConsole=True\n)\n\n# Basic logging\nlogger.info(\"This is an info message\")\nlogger.warning(\"This is a warning\")\nlogger.error(\"This is an error\")\nlogger.success(\"This is a success message\")\nlogger.debug(\"This is a debug message\")\nlogger.critical(\"This is a critical message\")\n\n# Custom logging\nlogger.custom(\"This is a custom message\", \"CUSTOM\", \"orange\")\n```\n\n## Advanced Usage\n\n### MongoDB Integration\n\n```python\nlogger = Tamga(\n    logToMongo=True,\n    mongoURI=\"your_mongodb_uri\",\n    mongoDatabaseName=\"logs_db\",\n    mongoCollectionName=\"application_logs\"\n)\n```\n\n### Email Notifications\n\n```python\nlogger = Tamga(\n    sendMail=True,\n    smtpServer=\"smtp.gmail.com\",\n    smtpPort=587,\n    smtpMail=\"your_email@gmail.com\",\n    smtpPassword=\"your_password\",\n    smtpReceivers=[\"receiver@email.com\"],\n    mailLevels=[\"CRITICAL\", \"ERROR\"]\n)\n```\n\n### File Rotation and Backup\n\n```python\nlogger = Tamga(\n    logToFile=True,\n    logToJSON=True,\n    maxLogSize=10,  # MB\n    maxJsonSize=10,  # MB\n    enableBackup=True\n)\n```\n\n### API Integration\n\n```python\nlogger = Tamga(\n    logToAPI=True,\n    apiURL=\"http://your-api.com/logs\"\n)\n```\n\n## Available Log Levels\n\n- INFO (sky blue)\n- WARNING (amber)\n- ERROR (rose)\n- SUCCESS (emerald)\n- DEBUG (indigo)\n- CRITICAL (red)\n- DATABASE (green)\n- MAIL (neutral)\n- METRIC (cyan)\n- TRACE (gray)\n- Custom (user-defined)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n- Do\u011fukan \u00dcrker\n- Email: dogukanurker@icloud.com\n- GitHub: [@dogukanurker](https://github.com/dogukanurker) \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A modern, async-capable logging utility with multiple output formats and colorful console output",
    "version": "0.1.12",
    "project_urls": {
        "Documentation": "https://tamga.vercel.app/",
        "Homepage": "https://tamga.vercel.app/",
        "Source": "https://github.com/dogukanurker/tamga/"
    },
    "split_keywords": [
        "logging",
        " async",
        " mongodb",
        " colorful",
        " console",
        " file",
        " json",
        " sql",
        " email"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7c7fe4245de7a2e88fc87232c0b60c6c97de458100c8d653f86b9ea2f62601a",
                "md5": "ac5ba314bcde7f2846adfff41274cffa",
                "sha256": "518e26552d5532075fca2f202000b465e4e6bbcaa15a67df86bbb9e6b032ecc2"
            },
            "downloads": -1,
            "filename": "tamga-0.1.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac5ba314bcde7f2846adfff41274cffa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 11268,
            "upload_time": "2025-02-09T17:39:26",
            "upload_time_iso_8601": "2025-02-09T17:39:26.277667Z",
            "url": "https://files.pythonhosted.org/packages/f7/c7/fe4245de7a2e88fc87232c0b60c6c97de458100c8d653f86b9ea2f62601a/tamga-0.1.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "022ff75520b31a70b059330e4ff374801c7b86dab7d79b63af9b69ecf0647259",
                "md5": "5ec8166d01d954b7751256217e7f7cce",
                "sha256": "46e1e400cfb5bbb3c7647aa337076a4e6325e241a06b6f3ce572124f12718991"
            },
            "downloads": -1,
            "filename": "tamga-0.1.12.tar.gz",
            "has_sig": false,
            "md5_digest": "5ec8166d01d954b7751256217e7f7cce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 11779,
            "upload_time": "2025-02-09T17:39:29",
            "upload_time_iso_8601": "2025-02-09T17:39:29.289790Z",
            "url": "https://files.pythonhosted.org/packages/02/2f/f75520b31a70b059330e4ff374801c7b86dab7d79b63af9b69ecf0647259/tamga-0.1.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-09 17:39:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dogukanurker",
    "github_project": "tamga",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tamga"
}
        
Elapsed time: 0.44611s