Download and fetch details about Minecraft server jars.
Install the module with pip:
pip3 install serverjars-api
Update existing installation: pip3 install serverjars-api --upgrade
- Access vanilla or modded Minecraft jars.
- No 3rd party APIs.
- Add support for your own jar service.
Name | Description |
---|---|
requests | Requests is a simple, yet elegant, HTTP library. |
pydantic | Data validation using Python type hints |
Fetching the latest jar:
import serverjars
latest = serverjars.fetch_latest('vanilla', 'release')
print(latest)
Fetching all the Jars:
import serverjars
allJars = serverjars.fetch_all('vanilla', 'snapshot')
print(allJars)
Fetching types:
import serverjars
subtypes = serverjars.fetch_types('modded')
print(subtypes)
Downloading Jars:
import serverjars
serverjars.download_jar('vanilla', "release")
Create and run a Minecraft server
import serverjars
app = serverjars.App.create('vanilla', "release", fp="svr/server.jar")
app.run()