Skip to content

Commit

Permalink
v0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
legopitstop committed Dec 14, 2023
1 parent ec77423 commit a54230e
Show file tree
Hide file tree
Showing 20 changed files with 1,144 additions and 906 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.env
/test.py
/test.py
/app.py
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ 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] - 12/13/2023
### General
- "find" and "update" methods should now work.
- "list" methods now return a dictionary containing the ID and NAME instead of a partial class. You will have to use "get" methods to convert them to classes

### Known Issues
- list_servers_by_connection, and update_server all throw "Access denied"
- get_own_api_key throws "Incorrect API key from user: USERNAME"

## [0.0.1] - 11/29/2023

Initial release
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![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)
[![Issues](https://img.shields.io/github/issues/legopitstop/multicraft-py)](https://github.com/legopitstop/multicraft-py/issues)

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

Expand All @@ -16,12 +16,36 @@ pip3 install multicraft
Update existing installation: `pip3 install multicraft --upgrade`

## Features
- Authed requests
- Includes a handful of common multicraft hosts.
- Manage users, players, commands, schedules, and databases.
- Start, stop, or restart your server.
- Run console commands (give, kill, whitelist, op, etc)
- Read your servers current cpu and memmory usage.
- Send a chat message.

See the docs for more information.
See the [docs](https://github.com/legopitstop/multicraft-py/wiki) for more information.

## Dependencies
|Name|Description|
|--|--|
|[requests](https://pypi.org/project/requests/) | Requests is a simple, yet elegant, HTTP library. |

## Example
```py
from multicraft import MulticraftAPI

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

owner = api.get_user_id(api.user)

owned_servers = api.list_servers_by_owner(owner)
print(owned_servers)

for id in owned_servers.keys():
server = api.get_server(id)
print(server)
```
Binary file added dist/multicraft-0.0.1.tar.gz
Binary file not shown.
Binary file added dist/multicraft-0.0.2.tar.gz
Binary file not shown.
1 change: 0 additions & 1 deletion examples.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import multicraft


api = multicraft.MulticraftAPI(
url = 'https://localhost/api.php',
user = 'username',
Expand Down
70 changes: 70 additions & 0 deletions multicraft.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Metadata-Version: 2.1
Name: multicraft
Version: 0.0.2
Summary: Interact with your Minecraft server from hosts that use Multicraft using Python
Home-page: https://github.com/legopitstop/multicraft-py
Author: Legopitstop
Author-email: officiallegopitstop@gmail.com
License: MIT
Keywords: multicraft,minecraft,minecraftserver,server
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE

# 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-py)](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
- Includes a handful of common multicraft hosts.
- Manage users, players, commands, schedules, and databases.
- Start, stop, or restart your server.
- Run console commands (give, kill, whitelist, op, etc)
- Read your servers current cpu and memmory usage.
- Send a chat message.

See the [docs](https://github.com/legopitstop/multicraft-py/wiki) for more information.

## Dependencies
|Name|Description|
|--|--|
|[requests](https://pypi.org/project/requests/) | Requests is a simple, yet elegant, HTTP library. |

## Example
```py
from multicraft import MulticraftAPI

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

owner = api.get_user_id(api.user)

owned_servers = api.list_servers_by_owner(owner)
print(owned_servers)

for id in owned_servers.keys():
server = api.get_server(id)
print(server)
```
13 changes: 13 additions & 0 deletions multicraft.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
LICENSE
README.md
setup.cfg
setup.py
multicraft/__init__.py
multicraft/api.py
multicraft/hosts.py
multicraft/model.py
multicraft.egg-info/PKG-INFO
multicraft.egg-info/SOURCES.txt
multicraft.egg-info/dependency_links.txt
multicraft.egg-info/requires.txt
multicraft.egg-info/top_level.txt
1 change: 1 addition & 0 deletions multicraft.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions multicraft.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests
1 change: 1 addition & 0 deletions multicraft.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
multicraft
Loading

0 comments on commit a54230e

Please sign in to comment.