# Taman - System Monitoring API
Taman is a FastAPI-based system monitoring tool that provides real-time process tracking and resource usage information through RESTful endpoints and Server-Sent Events (SSE).
## Features
- **Real-time system monitoring**: CPU usage, memory consumption, and process information
- **Process management**: Kill processes by PID
- **Streaming data**: Real-time updates via Server-Sent Events
- **Cross-platform**: Works on Windows, macOS, and Linux
- **REST API**: Clean and simple API endpoints
- **CORS support**: Ready for web frontend integration
## Installation
Install from PyPI:
```bash
pip install taman
```
Or install from source:
```bash
git clone https://github.com/yourusername/taman
cd taman
pip install -e .
```
## Quick Start
### Running the API server
```bash
# Start the server
taman
# Or run directly with Python
python -m taman.main
```
The API will be available at `http://localhost:8000`
### API Endpoints
- `GET /process` - Get current processes list
- `GET /process/stream` - Stream real-time system data (SSE)
- `GET /kill/{pid}` - Terminate a process by PID
### Example Usage
```python
import requests
# Get current processes
response = requests.get("http://localhost:8000/process")
processes = response.json()
# Kill a process
response = requests.get("http://localhost:8000/kill/1234")
```
### Streaming Data Example
```javascript
// JavaScript example for consuming SSE stream
const eventSource = new EventSource('http://localhost:8000/process/stream');
eventSource.onmessage = function(event) {
const data = JSON.parse(event.data);
console.log('System Stats:', data.system_stats);
console.log('Processes:', data.processes);
};
```
## Development
### Setup Development Environment
```bash
# Clone the repository
git clone https://github.com/yourusername/taman
cd taman
# Install with development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black taman/
# Lint code
flake8 taman/
```
### Running in Development Mode
```bash
# Run with auto-reload
uvicorn taman.main:app --reload --host 0.0.0.0 --port 8000
```
## Data Format
### System Stats Response
```json
{
"system_stats": {
"cpu_usage": 15.2,
"cores_usage": [12.1, 18.3, 14.7, 16.8],
"memory_usage": {
"total_gb": 16.0,
"used_gb": 8.5,
"percent": 53.1
}
},
"processes": [
{
"name": "python.exe",
"pid": 1234,
"runtime_seconds": 3600.5,
"ram_bytes": 52428800,
"threads": 8
}
]
}
```
## Requirements
- Python 3.8+
- FastAPI
- psutil
- uvicorn
- wmi (Windows only)
## License
MIT License - see LICENSE file for details.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## Support
If you encounter any issues, please file a bug report on the [GitHub Issues](https://github.com/yourusername/taman/issues) page.
Raw data
{
"_id": null,
"home_page": "https://github.com/yourusername/taman",
"name": "taman",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "system, monitoring, fastapi, process, resource",
"author": "Your Name",
"author_email": "Your Name <your.email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/81/19/fd8de64a2313bfa60e611b2170b23316ea91ac6fa050a7d3750e8cdce76e/taman-0.1.0.tar.gz",
"platform": null,
"description": "# Taman - System Monitoring API\r\n\r\nTaman is a FastAPI-based system monitoring tool that provides real-time process tracking and resource usage information through RESTful endpoints and Server-Sent Events (SSE).\r\n\r\n## Features\r\n\r\n- **Real-time system monitoring**: CPU usage, memory consumption, and process information\r\n- **Process management**: Kill processes by PID\r\n- **Streaming data**: Real-time updates via Server-Sent Events\r\n- **Cross-platform**: Works on Windows, macOS, and Linux\r\n- **REST API**: Clean and simple API endpoints\r\n- **CORS support**: Ready for web frontend integration\r\n\r\n## Installation\r\n\r\nInstall from PyPI:\r\n\r\n```bash\r\npip install taman\r\n```\r\n\r\nOr install from source:\r\n\r\n```bash\r\ngit clone https://github.com/yourusername/taman\r\ncd taman\r\npip install -e .\r\n```\r\n\r\n## Quick Start\r\n\r\n### Running the API server\r\n\r\n```bash\r\n# Start the server\r\ntaman\r\n\r\n# Or run directly with Python\r\npython -m taman.main\r\n```\r\n\r\nThe API will be available at `http://localhost:8000`\r\n\r\n### API Endpoints\r\n\r\n- `GET /process` - Get current processes list\r\n- `GET /process/stream` - Stream real-time system data (SSE)\r\n- `GET /kill/{pid}` - Terminate a process by PID\r\n\r\n### Example Usage\r\n\r\n```python\r\nimport requests\r\n\r\n# Get current processes\r\nresponse = requests.get(\"http://localhost:8000/process\")\r\nprocesses = response.json()\r\n\r\n# Kill a process\r\nresponse = requests.get(\"http://localhost:8000/kill/1234\")\r\n```\r\n\r\n### Streaming Data Example\r\n\r\n```javascript\r\n// JavaScript example for consuming SSE stream\r\nconst eventSource = new EventSource('http://localhost:8000/process/stream');\r\n\r\neventSource.onmessage = function(event) {\r\n const data = JSON.parse(event.data);\r\n console.log('System Stats:', data.system_stats);\r\n console.log('Processes:', data.processes);\r\n};\r\n```\r\n\r\n## Development\r\n\r\n### Setup Development Environment\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/yourusername/taman\r\ncd taman\r\n\r\n# Install with development dependencies\r\npip install -e \".[dev]\"\r\n\r\n# Run tests\r\npytest\r\n\r\n# Format code\r\nblack taman/\r\n\r\n# Lint code\r\nflake8 taman/\r\n```\r\n\r\n### Running in Development Mode\r\n\r\n```bash\r\n# Run with auto-reload\r\nuvicorn taman.main:app --reload --host 0.0.0.0 --port 8000\r\n```\r\n\r\n## Data Format\r\n\r\n### System Stats Response\r\n\r\n```json\r\n{\r\n \"system_stats\": {\r\n \"cpu_usage\": 15.2,\r\n \"cores_usage\": [12.1, 18.3, 14.7, 16.8],\r\n \"memory_usage\": {\r\n \"total_gb\": 16.0,\r\n \"used_gb\": 8.5,\r\n \"percent\": 53.1\r\n }\r\n },\r\n \"processes\": [\r\n {\r\n \"name\": \"python.exe\",\r\n \"pid\": 1234,\r\n \"runtime_seconds\": 3600.5,\r\n \"ram_bytes\": 52428800,\r\n \"threads\": 8\r\n }\r\n ]\r\n}\r\n```\r\n\r\n## Requirements\r\n\r\n- Python 3.8+\r\n- FastAPI\r\n- psutil\r\n- uvicorn\r\n- wmi (Windows only)\r\n\r\n## License\r\n\r\nMIT License - see LICENSE file for details.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please feel free to submit a Pull Request.\r\n\r\n## Support\r\n\r\nIf you encounter any issues, please file a bug report on the [GitHub Issues](https://github.com/yourusername/taman/issues) page.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A system monitoring API with real-time process tracking and resource usage",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/yourusername/taman",
"Issues": "https://github.com/yourusername/taman/issues",
"Repository": "https://github.com/yourusername/taman"
},
"split_keywords": [
"system",
" monitoring",
" fastapi",
" process",
" resource"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "93dc3f034ee07cd980517776fb83d78ea59de2068de067bddbef8f4f973b203c",
"md5": "d2b25cc61a7c714ec6d00c10efb26248",
"sha256": "ca8a5b8c71ab57894a81f5c541843a837ee2fa115c1a105ab3bc1226c9a28e4e"
},
"downloads": -1,
"filename": "taman-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d2b25cc61a7c714ec6d00c10efb26248",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4100337,
"upload_time": "2025-08-28T18:40:15",
"upload_time_iso_8601": "2025-08-28T18:40:15.160533Z",
"url": "https://files.pythonhosted.org/packages/93/dc/3f034ee07cd980517776fb83d78ea59de2068de067bddbef8f4f973b203c/taman-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8119fd8de64a2313bfa60e611b2170b23316ea91ac6fa050a7d3750e8cdce76e",
"md5": "585a0f970a54e66855c3baa8f7b48950",
"sha256": "943e5f6a179677e84ff143b5eeb51e1fde240bd2436cad08bc932917a92b4c5a"
},
"downloads": -1,
"filename": "taman-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "585a0f970a54e66855c3baa8f7b48950",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 3463335,
"upload_time": "2025-08-28T18:40:17",
"upload_time_iso_8601": "2025-08-28T18:40:17.263216Z",
"url": "https://files.pythonhosted.org/packages/81/19/fd8de64a2313bfa60e611b2170b23316ea91ac6fa050a7d3750e8cdce76e/taman-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-28 18:40:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yourusername",
"github_project": "taman",
"github_not_found": true,
"lcname": "taman"
}