{"id":20884058,"url":"https://github.com/pcorbel/topify","last_synced_at":"2025-05-12T18:31:24.838Z","repository":{"id":39459987,"uuid":"183234570","full_name":"pcorbel/topify","owner":"pcorbel","description":"A user-friendly top-like monitoring","archived":false,"fork":false,"pushed_at":"2023-01-04T04:55:33.000Z","size":5888,"stargazers_count":11,"open_issues_count":25,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-01T09:47:13.361Z","etag":null,"topics":["docker","htop","monitoring","python","top","vue-router","vuejs","vuetify","vuex"],"latest_commit_sha":null,"homepage":"https://topify.corbel.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pcorbel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-24T13:28:05.000Z","updated_at":"2024-04-25T15:19:58.000Z","dependencies_parsed_at":"2023-02-01T21:45:57.375Z","dependency_job_id":null,"html_url":"https://github.com/pcorbel/topify","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcorbel%2Ftopify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcorbel%2Ftopify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcorbel%2Ftopify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcorbel%2Ftopify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pcorbel","download_url":"https://codeload.github.com/pcorbel/topify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253798061,"owners_count":21965998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","htop","monitoring","python","top","vue-router","vuejs","vuetify","vuex"],"created_at":"2024-11-18T08:08:54.467Z","updated_at":"2025-05-12T18:31:24.527Z","avatar_url":"https://github.com/pcorbel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# topify\n\nA user-friendly top-like monitoring\n\n[![](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![](https://img.shields.io/badge/python-3.7+-blue.svg)]()\n[![](https://img.shields.io/badge/status-stable-green.svg)]()\n[![](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n![screenshot_project](docs/screenshot.png)\n\n# How to launch\n\n* docker run\n```\ndocker run \\\n--rm \\\n-d \\\n--name topify \\\n--pid host \\\n--network host \\\n--volume \"/var/run/docker.sock:/var/run/docker.sock\" \\\n--volume \"/etc/os-release:/etc/os-release:ro\" \\\n--volume \"/etc/passwd:/etc/passwd:ro\" \\\n--volume \"/etc/group:/etc/group:ro\" \\\n-e \"REFRESH_INTERVAL=1000\"\npcorbel/topify:v0.1.0 \n```\n\n* docker-compose\n```\ndocker-compose up -d topify\n```\n\nThen open your browser to [localhost:5000](localhost:5000)\n\n# How to add a custom collector\n\nSimply add your class in the [topify/collectors](https://github.com/pcorbel/topify/tree/master/topify/collectors) directory.\n\nThe class should inherit from [BaseCollector](https://github.com/pcorbel/topify/blob/master/topify/common/base_collector.py)\n\nThe data of the collector will be exposed on a Flask endpoint named after the `_id` attribute.\n\n# Example of custom collector\n\n* topify/collectors/my_collector.py\n```\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom dataclasses import dataclass\nfrom ..common.base_collector import BaseCollector\n\n@dataclass\nclass MyCollector(BaseCollector): # Inherit from BaseCollector\n    _id: str = \"my_collector\" # The endpoint will be named after that. Required\n    my_custom_value: int = 0 # A value of the collector\n\n    def collect(self) -\u003e None: # The collect method that will be called to update the values of the collector. Required\n        self.my_custom_value += 1 \n\n```\n\n* curl to access the collector value\n```\n$ curl -X GET \"http://localhost:5000/my_collector\" -H \"accept: application/json\"\n{\"_id\": \"my_collector\", \"my_custom_value\": 30}\n```\n\n# Roadmap\n\n* Use [expandable datatable](https://vuetifyjs.com/en/components/data-tables#slot-expand) to show raw data from the collector\n* Integrate more [psutil.network](https://psutil.readthedocs.io/en/latest/#network) functions to compute rate per second\n* Integrate more [psutil.network](https://psutil.readthedocs.io/en/latest/#network) functions to make an iftop-like view\n* Try to reduce footprint by moving from Flask to [aiohttp](https://github.com/aio-libs/aiohttp)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcorbel%2Ftopify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpcorbel%2Ftopify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcorbel%2Ftopify/lists"}