Skip to main content

Super simple modrinth api wrapper for python

Project description

mvsma

mvsma, aka mhamster's very simple modrinth api (wrapper), is a super simple modrinth api wrapper for python.

It provides plain and simple access to modrinth's api endpoints and returns their plain responses. Very easy to use!

For information about api models see modrinth api documentation.

Examples

Search for a projects:

from mvsma import Modrinth

m = Modrinth()
# Search for mod called 'cesium' and print first result
m.ua = 'Package example from https://github.com/mhamsterr/mvsma' # Edit User-Agent of request so everyone will know who we are and what we are doing

response = m.search(query="cesium")
print(response["hits"][0])

Get versions of a project:

from mvsma import Modrinth

m = Modrinth()
# Get versions of mod with slug "supercoolmod"
m.ua = 'Package example from https://github.com/mhamsterr/mvsma' # Edit User-Agent of request so everyone will know who we are and what we are doing

response = m.project_versions(slug="supercoolmod")
print(response)

Get list of random projects

from mvsma import Modrinth

m = Modrinth()
# Get list of random projects
m.ua = 'Package example from https://github.com/mhamsterr/mvsma' # Edit User-Agent of request so everyone will know who we are and what we are doing

response = m.random_projects(count=11)
print(response)

Documentation:

TODO

Installation

pip install mvsma

License:

MIT License, find more in 'LICENSE' file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mvsma-1.0.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

mvsma-1.0.1-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page