tamga
A modern, high-performance logging utility for Python with multiple output formats and colorful console output.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.5%) to scientific vocabulary
Keywords
Repository
A modern, high-performance logging utility for Python with multiple output formats and colorful console output.
Basic Info
- Host: GitHub
- Owner: DogukanUrker
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://tamga.vercel.app
- Size: 3.8 MB
Statistics
- Stars: 71
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 16
Topics
Metadata Files
README.md
Tamga 
A modern, high-performance logging utility for Python with multiple output formats and colorful console output.
🤖 AI Integration: For AI/LLM integration, see LLMs.txt or access documentation directly via Context7
tam·ga /ˈtæmɡə/ · noun An ancient Turkic symbol or seal used for marking ownership, identity, or lineage.

✨ Features
- 🎨 Beautiful Console Output - Colorful, formatted logs using Tailwind CSS colors
- ⚡ High Performance - Buffered writing system (10x faster than traditional logging)
- 📊 Multiple Outputs - Console, file, JSON, SQLite, MongoDB
- 🔄 Automatic Rotation - File size management with backup support
- 🧵 Thread-Safe - Safe for multi-threaded applications
- 🔔 Notifications - Multi-service notifications via Apprise (Discord, Slack, Email, SMS, and more)
- 🔍 Structured Logging - Key-value data support with all log methods
🚀 Quick Start
See examples/simple_usage.py for a full script.
```python from tamga import Tamga
Create logger with default settings
logger = Tamga()
Log messages
logger.info("Application started") logger.warning("Memory usage at 85%") logger.error("Failed to connect to API") logger.success("User registered successfully") logger.debug("Cache initialized with 1000 entries") ```
🧑💻 Examples
See examples/ for ready-to-run scripts:
simple_usage.py— basic loggingfastapi_webapp.py— FastAPI integrationadvanced_config.py— production confighigh_performance.py— high-speed big data logging demo
📦 Installation
bash
pip install tamga # Basic installation
pip install tamga[mongo] # With MongoDB support
pip install tamga[notifications] # With notification support
pip install tamga[all] # All features
🎯 Usage Examples
Basic Configuration
```python logger = Tamga( # Display settings coloredoutput=True, # Colored output showtime=True, # Include timestamp show_timezone=False, # Include timezone
# Output destinations
file_output=True, # Log to file
file_path="app.log", # Log file path
buffer_size=50, # Buffer size for performance
) ```
Structured Logging
```python
Log with key-value data using any log method
logger.info("User action", userid="123", action="login", ipaddress="192.168.1.1", success=True )
Works with all log levels
logger.error("Database connection failed", host="localhost", port=5432, timeout=30, retry_count=3 )
logger.success("Payment processed", amount=99.99, currency="USD", method="creditcard", transactionid="tx_123" ) ```
Production Setup
```python logger = Tamga( # File rotation fileoutput=True, maxfilesizemb=50, # 50MB max file size enable_backup=True, # Create backups
# Performance
buffer_size=200, # Larger buffer for production
console_output=False, # Disable console for speed
# External services
mongo_output=True,
mongo_uri="mongodb://...",
# Multi-service notifications
notify_services=[
"discord://webhook_id/webhook_token",
"slack://tokenA/tokenB/tokenC/#alerts",
"mailto://user:pass@smtp.gmail.com:587/?to=alerts@company.com",
"twilio://SID:Token@+1234567890/+0987654321",
],
notify_levels=["CRITICAL", "ERROR", "NOTIFY"],
) ```
📋 Log Levels
| Level | Color | Method | Use Case |
|-------|-------|---------|----------|
| INFO | Sky | logger.info() | General information |
| WARNING | Amber | logger.warning() | Warning messages |
| ERROR | Rose | logger.error() | Error messages |
| SUCCESS | Emerald | logger.success() | Success messages |
| DEBUG | Indigo | logger.debug() | Debug information |
| CRITICAL | Red | logger.critical() | Critical issues |
| DATABASE | Green | logger.database() | Database operations |
| NOTIFY | Purple | logger.notify() | Send notifications |
| METRIC | Cyan | logger.metric() | Performance metrics |
| TRACE | Gray | logger.trace() | Detailed trace info |
| CUSTOM | Any | logger.custom() | Custom levels |
🔧 Advanced Features
Notifications
```python
Configure notification services (supports 80+ services via Apprise)
logger = Tamga( notifyservices=[ "discord://webhookid/webhooktoken", "slack://tokenA/tokenB/tokenC/#channel", ], notifylevels=["CRITICAL", "ERROR", "NOTIFY"], notifytitle="{appname}: {level} Alert", notifyformat="markdown", # text, markdown, or html )
Send notification
logger.notify("Payment received from user #123")
Critical logs also trigger notifications
logger.critical("Database connection lost") ```
Custom Log Levels
python
logger.custom("Deploy completed", "DEPLOY", "purple")
logger.custom("Payment received", "PAYMENT", "green")
Buffer Control
```python
Force write all buffered logs
logger.flush() ```
File Rotation
When log files reach max_file_size_mb, Tamga automatically:
- Creates timestamped backups (if enabled)
- Clears the original file
- Continues logging seamlessly
📊 Performance
Tamga uses a buffered writing system that delivers significantly faster performance compared to traditional logging. The buffering mechanism provides optimal throughput for high-volume logging scenarios while maintaining thread safety.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
Made with ❤️ by Doğukan Ürker
Owner
- Name: Doğukan Ürker
- Login: DogukanUrker
- Kind: user
- Location: İzmir, Türkiye
- Company: @sensity-ai
- Website: dogukanurker.com
- Twitter: dogukanurker
- Repositories: 3
- Profile: https://github.com/DogukanUrker
full-stack engineer @sensity-ai
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it using these metadata."
title: "Tamga"
type: software
authors:
- given-names: Doğukan Mete
family-names: Ürker
email: dogukanurker@icloud.com
repository-code: https://github.com/dogukanurker/Tamga
url: https://tamga.vercel.app
abstract: "Modern, logging utility for Python with multiple output formats and colorful console output."
keywords:
- logger
- pip
- python
- async
license: MIT
GitHub Events
Total
- Create event: 23
- Issues event: 10
- Release event: 15
- Watch event: 63
- Delete event: 8
- Issue comment event: 19
- Public event: 2
- Push event: 102
- Pull request review comment event: 6
- Pull request review event: 9
- Pull request event: 13
- Fork event: 2
Last Year
- Create event: 23
- Issues event: 10
- Release event: 15
- Watch event: 63
- Delete event: 8
- Issue comment event: 19
- Public event: 2
- Push event: 102
- Pull request review comment event: 6
- Pull request review event: 9
- Pull request event: 13
- Fork event: 2
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Doğukan Ürker | d****r@i****m | 67 |
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 8
- Total pull requests: 20
- Average time to close issues: about 1 month
- Average time to close pull requests: about 2 hours
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 0.5
- Average comments per pull request: 1.95
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 2
Past Year
- Issues: 8
- Pull requests: 20
- Average time to close issues: about 1 month
- Average time to close pull requests: about 2 hours
- Issue authors: 3
- Pull request authors: 2
- Average comments per issue: 0.5
- Average comments per pull request: 1.95
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 2
Top Authors
Issue Authors
- DogukanUrker (6)
- bladecell (1)
- AboveAphid (1)
Pull Request Authors
- DogukanUrker (18)
- imgbot[bot] (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 264 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 20
- Total maintainers: 1
pypi.org: tamga
A modern, high-performance async logging utility with multiple output formats and colorful console output
- Homepage: https://tamga.vercel.app/
- Documentation: https://tamga.vercel.app/
- License: MIT
-
Latest release: 1.4.0
published 6 months ago