{"id":26714948,"url":"https://github.com/endstonemc/bstats","last_synced_at":"2025-03-27T13:51:36.140Z","repository":{"id":266317323,"uuid":"854106364","full_name":"EndstoneMC/bstats","owner":"EndstoneMC","description":"bStats Metrics for Endstone Plugins","archived":false,"fork":false,"pushed_at":"2024-12-03T16:38:20.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-03T17:43:03.810Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EndstoneMC.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-08T12:38:25.000Z","updated_at":"2024-12-03T16:39:39.000Z","dependencies_parsed_at":"2024-12-03T17:43:56.606Z","dependency_job_id":"3034c8fe-ee62-40ef-863c-4474b3f92f7a","html_url":"https://github.com/EndstoneMC/bstats","commit_stats":null,"previous_names":["endstonemc/bstats"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndstoneMC%2Fbstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndstoneMC%2Fbstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndstoneMC%2Fbstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndstoneMC%2Fbstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EndstoneMC","download_url":"https://codeload.github.com/EndstoneMC/bstats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245858851,"owners_count":20684057,"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":[],"created_at":"2025-03-27T13:51:35.505Z","updated_at":"2025-03-27T13:51:36.134Z","avatar_url":"https://github.com/EndstoneMC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# endstone-bstats\n\n`endstone-bstats` is a Python library that provides functionality for integrating bStats metrics into your Endstone\nplugins. It is designed to be simple, extensible, and lightweight.\n\n## Features\n\n- Supports various types of charts, including:\n    - Simple Pie\n    - Advanced Pie\n    - Drilldown Pie\n    - Single Line\n    - Multi Line\n    - Simple Bar\n    - Advanced Bar\n- Easy-to-use APIs for collecting and sending metric data.\n- Designed for flexibility and extensibility.\n\n## Installation\n\nInstall the package using pip:\n\n```bash\npip install endstone-bstats\n```\n\n## Quick start\n\n[bStats](https://bstats.org/getting-started) is a free and open source website that helps you to collect usage data for\nyour plugin. Integrating bStats into your plugin is straight forward and done in a matter of seconds.\n\nHere’s a simple example of how to add bStats to your plugin.\n\n```python\nfrom endstone.plugin import Plugin\nfrom endstone_bstats import Metrics\n\n\nclass ExamplePlugin(Plugin):\n    def on_enable(self):\n        plugin_id = 1234  # \u003c-- Replace with the id of your plugin!\n        self._metrics = Metrics(self, plugin_id)\n\n    def on_disable(self):\n        self._metrics.shutdown()\n```\n\nAfter adding bStats to your plugin you have to [create an account](https://bstats.org/register) to register your plugin.\nYou can manage your plugins with this account, e.g. adding customs graphs, etc.\n\n## Add custom charts\n\nAdding charts to your plugin consists of two parts:\n\n- Adding charts to your code\n- Adding charts on the website\n\nTo add a chart on the website, check the [detailed instructions here](https://bstats.org/help/custom-charts).\n\nA **Simple Pie** is the most basic chart type. It's a great option for config settings as it only accepts one value per\nserver. Adding the chart to your code is fairly easy:\n\n```python\nfrom endstone.plugin import Plugin\nfrom endstone_bstats import Metrics, SimplePie\n\n\nclass ExamplePlugin(Plugin):\n    def on_enable(self):\n        plugin_id = 1234  # \u003c-- Replace with the id of your plugin!\n        self._metrics = Metrics(self, plugin_id)\n        self._metrics.add_custom_chart(\n            SimplePie(\"used_language\", lambda: \"en_US\")\n        )\n\n    def on_disable(self):\n        self._metrics.shutdown()\n```\n\n## Contributing\n\nWe welcome contributions! Feel free to open an issue or submit a pull request to improve the library.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\nThis library is inspired by [bStats for Java](https://bstats.org/), ported by the EndstoneMC team to Python.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendstonemc%2Fbstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendstonemc%2Fbstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendstonemc%2Fbstats/lists"}