Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oskarsmc-network/hangarmc-hangar
Hangar SDK for python
https://github.com/oskarsmc-network/hangarmc-hangar
Last synced: about 2 months ago
JSON representation
Hangar SDK for python
- Host: GitHub
- URL: https://github.com/oskarsmc-network/hangarmc-hangar
- Owner: OskarsMC-Network
- Created: 2022-07-28T14:58:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-02T19:28:43.000Z (over 2 years ago)
- Last Synced: 2024-10-31T15:48:22.088Z (2 months ago)
- Language: Python
- Homepage: https://pypi.org/project/hangarmc-hangar/
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hangarmc-hangar
pythonic type-hinted [hangar](https://github.com/HangarMC/Hangar) API wrapper
## Installation
hangarmc-hangar requires python 3.9 or above
```shell
# PIP3
pip3 install hangarmc-hangar
# PIP
pip install hangarmc-hangar
# Poetry
poetry add hangarmc-hangar
```## API
All functions and classes are properly type hinted and documented with quotes/comments. Please file an issue or pull
request if any issues are found.### Basic Usage
#### Example
```python
from hangarmc_hangar import Hangar, HangarApiException# Create an SDK instance
hangar = Hangar()try:
# Get all projects
projects = hangar.search_projects()
# Output data
print(f"Project amount: {projects.pagination.count}")
for project in projects.result:
print(project.name)
except HangarApiException as e:
raise```
#### Output
```shell
$ python sketch.py
Project amount: 32
CoolProject
NotQuests
EndBiomeFixer
... and on
```