Updated README
This commit is contained in:
parent
550873b8c7
commit
90a5be3eba
@ -1,3 +1,10 @@
|
|||||||
# MineHost Interface
|
# 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
37
main.py
Normal 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()
|
6
setup.py
6
setup.py
@ -5,13 +5,17 @@ with open("README.md", "r") as f:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="minehost-interface",
|
name="minehost-interface",
|
||||||
version="1.0.2",
|
version="1.0.3",
|
||||||
author="Rokas Puzonas",
|
author="Rokas Puzonas",
|
||||||
author_email="rokas.puz@gmail.com",
|
author_email="rokas.puz@gmail.com",
|
||||||
description="A simple for interacting with minehost servers.",
|
description="A simple for interacting with minehost servers.",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
url="https://github.com/RokasPuzonas/minehost-interface",
|
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",
|
license="MIT",
|
||||||
packages=setuptools.find_packages(),
|
packages=setuptools.find_packages(),
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
Loading…
Reference in New Issue
Block a user