legopitstop / serverjars-py

Download and fetch details about Minecraft server jars.

Home Page:https://pypi.org/project/serverjars-api/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

serverjars-api

Tests PyPI Python Downloads Status Issues Code style: black

Download and fetch details about Minecraft server jars.

Installation

Install the module with pip:

pip3 install serverjars-api

Update existing installation: pip3 install serverjars-api --upgrade

Features

  • Access vanilla or modded Minecraft jars.
  • No 3rd party APIs.
  • Add support for your own jar service.

Links

Dependencies

Name Description
requests Requests is a simple, yet elegant, HTTP library.
pydantic Data validation using Python type hints

Code Examples:

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()

About

Download and fetch details about Minecraft server jars.

https://pypi.org/project/serverjars-api/

License:MIT License


Languages

Language:Python 99.5%Language:Batchfile 0.5%