-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec77423
commit a54230e
Showing
20 changed files
with
1,144 additions
and
906 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/.env | ||
/test.py | ||
/test.py | ||
/app.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [email protected] | ||
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) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
multicraft |
Oops, something went wrong.