Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
legopitstop committed Nov 29, 2023
0 parents commit ec77423
Show file tree
Hide file tree
Showing 16 changed files with 2,094 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.env
/test.py
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.1] - 11/29/2023

Initial release
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Legopitstop

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# multicraft

[![PyPI](https://img.shields.io/pypi/v/multicraft)](https://pypi.org/project/multicraft/)
[![Python](https://img.shields.io/pypi/pyversions/multicraft)](https://www.python.org/downloads/)
![Downloads](https://img.shields.io/pypi/dm/multicraft)
![Status](https://img.shields.io/pypi/status/multicraft)
[![Issues](https://img.shields.io/github/issues/legopitstop/multicraft)](https://github.com/legopitstop/multicraft-py/issues)

Interact with your Minecraft server from hosts that use [Multicraft](https://www.multicraft.org/) using Python.

## Installation
Install the module with pip:
```bat
pip3 install multicraft
```
Update existing installation: `pip3 install multicraft --upgrade`

## Features
- Authed requests
- Includes a handful of common multicraft hosts.

See the docs for more information.

## Dependencies
|Name|Description|
|--|--|
|[requests](https://pypi.org/project/requests/) | Requests is a simple, yet elegant, HTTP library. |
4 changes: 4 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@REM fix for appengine ImportError: pip install urllib3==1.26.15 requests-toolbelt==0.10.1
python setup.py sdist
python -m twine upload dist/* --config-file %userprofile%\Desktop\Python\.pypirc
pause
17 changes: 17 additions & 0 deletions examples.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import multicraft


api = multicraft.MulticraftAPI(
url = 'https://localhost/api.php',
user = 'username',
key = 'apiKey'
)

def examples():
owned_servers = api.list_servers_by_owner(api.get_user_id(api.user))
print(owned_servers)

connection_servers = api.list_servers_by_connection(1)
print(connection_servers)

examples()
Loading

0 comments on commit ec77423

Please sign in to comment.