{"id":34036869,"url":"https://github.com/sapphimars/physkit","last_synced_at":"2026-03-10T18:03:36.166Z","repository":{"id":270472093,"uuid":"910325498","full_name":"sapphimars/physkit","owner":"sapphimars","description":"A Python toolkit providing physical constants, unit conversions, and plotting styles","archived":false,"fork":false,"pushed_at":"2026-01-23T14:04:48.000Z","size":175,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-24T05:41:34.866Z","etag":null,"topics":["matplotlib","physics","pint","units"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sapphimars.png","metadata":{"files":{"readme":"README-pypi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-31T01:44:08.000Z","updated_at":"2026-01-23T14:04:44.000Z","dependencies_parsed_at":"2024-12-31T13:02:49.949Z","dependency_job_id":"7371c4da-b4a4-4e4c-8a6e-c0e973e1cf8c","html_url":"https://github.com/sapphimars/physkit","commit_stats":null,"previous_names":["sapphimars/physkit"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/sapphimars/physkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphimars%2Fphyskit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphimars%2Fphyskit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphimars%2Fphyskit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphimars%2Fphyskit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapphimars","download_url":"https://codeload.github.com/sapphimars/physkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphimars%2Fphyskit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30346483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["matplotlib","physics","pint","units"],"created_at":"2025-12-13T20:45:04.250Z","updated_at":"2026-03-10T18:03:36.156Z","avatar_url":"https://github.com/sapphimars.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/sapphimars/physkit/actions/workflows/test.yml/badge.svg)](https://github.com/sapphimars/physkit/actions/workflows/test.yml)\n[![PyPI Version](https://img.shields.io/pypi/v/physkit)](https://pypi.org/project/physkit/)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cfigure\u003e\n    \u003cimg src=\"https://github.com/sapphimars/physkit/blob/main/assets/physkit-logo-light.png?raw=true\" alt=\"Light mode logo\" width=240 /\u003e\n  \u003c/figure\u003e\n\u003c/div\u003e\n\n###### Icon created by [astroastra](https://github.com/astroastrastudio)\n\n# Physkit - A Python toolkit for constants, unit conversions, and equations\n\n**Physkit** is a Python library for performing scientific computations, unit conversions, and working with physical constants and equations.  \nIt provides tools for astrophysical and physical calculations, supporting multiple unit systems and CLI functionalities.\n\nThis is mostly for my own personal use. I found it nice to have a no frills way to convert units and easily get constants in the units I need.\n\n---\n\n## **License**\n\nThis project is licensed under the terms of the **GNU General Public License v3.0**.  \nSee the [LICENSE](https://github.com/sapphimars/physkit/blob/main/LICENSE) file for details.\n\nCopyright (C) 2024 [sapphimars](https://github.com/sapphimars)\n\n---\n\n### **Third-Party Licenses**\n\nThis project makes use of the following third-party libraries:\n\n- **[Matplotlib](https://matplotlib.org/)** - Licensed under the Matplotlib License Agreement. See [licenses/LICENSE-MATPLOTLIB.txt](https://github.com/sapphimars/physkit/blob/main/licenses/LICENSE-MATPLOTLIB.txt) or [directly on their repository](https://github.com/matplotlib/matplotlib/tree/main/LICENSE).\n- **[Pint](https://github.com/hgrecco/pint)** - Licensed under the BSD 3-Clause License. See [licenses/LICENSE-PINT.txt](https://github.com/sapphimars/physkit/blob/main/licenses/LICENSE-PINT.txt) or [directly on their repository](https://github.com/hgrecco/pint/blob/master/LICENSE).\n\nNote: Third-party libraries included in this project are licensed under their respective terms. See the `licenses/` directory for full details.\n\n---\n\n## **Installation**\n\n### **Requirements**\n\n- Python **3.12** or higher\n- Dependencies:\n  - **Matplotlib** \u003e= 3.5\n  - **Pint** \u003e= 0.20\n\n---\n\n### **Install via pip**\n\n```bash\npip install physkit\n```\n\n---\n\n### **For Development**\n\n```bash\npdm install\n```\n\nTo install test dependencies:\n\n```bash\npdm install -G test\n```\n\n---\n\n## **Usage Examples**\n\n### **Access Constants**\n\n```python\nimport physkit as pk\nfrom physkit.constants import constants as csts\n\nprint(csts.G)  # Gravitational constant in SI\npk.set_default(\"cgs\")\nprint(csts.G)  # Gravitational constant in CGS\n```\n\n---\n\n### **Unit Conversion**\n\n```python\nfrom physkit.conversions import convert_unit\n\nresult = convert_unit(1, 'm', 'cm')\nprint(result)  # Outputs: 100.0\n```\n\n---\n\n### **Equations**\n\n```python\nfrom physkit.equations import equations\n\n# Default units are SI. Specify other units explicitly, like so:\nmass = 1.0  # Solar mass\nradius = equations.gravitational_radius(mass, 'M_sun', 'km') # input mass in solar masses\nprint(radius)  # Gravitational radius in km\n```\n\n---\n\n### **Plot Styling**\n\nThis is just a quick way to make good looking plots simply.\n\n```python\nimport physkit as pk\nimport matplotlib.pyplot as plt\n\nx_data = [...]  # Example data for x and y\ny_data = [...]\n\nfig, ax = plt.subplots()\npk.plot_styler(x_data, y_data, ax=ax, title=\"test\",\n               ylabel=\"y label\", xlabel=\"x label\", loglog=True)\nplt.show()\n\n```\n\n---\n\n### **Command Line Interface (CLI)**\n\n```bash\nphyskit constant G --system cgs\n```\n\n```bash\nphyskit convert 1 m cm\n```\n\n---\n\n## **Contributing**\n\nContributions are welcome!\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-name`).\n3. Commit changes (`git commit -m \"Add new feature\"`).\n4. Push to your branch (`git push origin feature-name`).\n5. Open a Pull Request.\n\n---\n\n## **Issues**\n\nIf you encounter any issues or have suggestions, feel free to open an issue on [GitHub](https://github.com/sapphimars/physkit/issues).\n\n---\n\n## **Contact**\n\nFor inquiries, contact me via GitHub: [sapphimars](https://github.com/sapphimars)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphimars%2Fphyskit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapphimars%2Fphyskit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphimars%2Fphyskit/lists"}