1
0

Updated README

This commit is contained in:
Rokas Puzonas 2020-08-11 10:45:00 +03:00
parent 550873b8c7
commit 90a5be3eba
3 changed files with 50 additions and 2 deletions

View File

@ -1,3 +1,10 @@
# MineHost Interface
A python library for executing commands or gettings information about MineHost minecraft servers.
A python library for executing commands or gettings information about MineHost minecraft servers.
Documentation: https://rokaspuzonas.github.io/minehost-interface
## Installation
```
pip install minehost-interface
```

37
main.py Normal file
View File

@ -0,0 +1,37 @@
import minehost
# Ensure that the latest are installed
# pip install -U setuptools wheel
# Build package
# python3 setup.py sdist bdist_wheel
# Upload to Test PyPi
# twine upload -R testpypi dist/*
# Upload to PyPi
# twine upload dist/*
# Install package from Test PyPi
# pip install --index-url https://test.pypi.org/simple/ <package-name>
def main():
session = minehost.Session()
try:
with open("session-id.ignore.txt", "r") as f:
session.cookies.set("PHPSESSID", f.read())
if not session.isValid():
raise minehost.InvalidSessionException
except (IOError, minehost.InvalidSessionException):
session.login("kasparas253@gmail.com", "5e1877")
acc = minehost.Account(session=session)
server = acc.getServer()
print(server.getInfo())
with open("session-id.ignore.txt", "w") as f:
f.write(session.cookies.get("PHPSESSID"))
if __name__ == "__main__":
main()

View File

@ -5,13 +5,17 @@ with open("README.md", "r") as f:
setuptools.setup(
name="minehost-interface",
version="1.0.2",
version="1.0.3",
author="Rokas Puzonas",
author_email="rokas.puz@gmail.com",
description="A simple for interacting with minehost servers.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/RokasPuzonas/minehost-interface",
project_urls={
"Documentation": "https://rokaspuzonas.github.io/minehost-interface",
"Source Code": "https://github.com/RokasPuzonas/minehost-interface",
},
license="MIT",
packages=setuptools.find_packages(),
classifiers=[