Skip to main content

vgmusic.py

Code style: black PyPI - Downloads PyPI - License PyPI PyPI - Python Version Lines of code

(unofficial) Python API for VGMusic. This project is in no way affiliated with or sponsered by Mike Newman or any of the staff at VGMusic.

Caches

vgmusic.py relies heavily on caches to avoid downloading VGMusic pages repeatedly; the CLI auto-caches for you into a cache.json file.

An example of a cache file is at the root of this repo; it is a pre-parsed full dump of info (direct links, authors, etc.) on all the songs currently on VGMusic. It weighs in at 8.5 MB as JSON (6 MB without indentation).

Usage

Thoughout these examples, we will be using the API object as the api:

import vgmusic

api = vgmusic.API()

It is recommended to close it once you are done:

# do something here...
api.close()

The best way is to use a context manager, a.k.a with statement:

with vgmusic.API() as api:
    # do something here

Note that the API is lazy: It will only retrieve data for a console/system the first time it is queried for it. To override this behaviour, use force_cache (see Module Documentation).

Module Documentation

See API.md.

CLI

The command-line interface can be used to download MIDI files concurrently (useful for scripting).

Make sure to install the CLI extra first:

pip install vgmusic[cli]

For more info on how to use the cli, run vgmusic --help.

REST

Install the rest extension:

pip install vgmusic[rest]

and start the server with python3 -m vgmusic.rest.

For docs, visit here once you've started the server.

License

MIT.

Metadata

Release files for vgmusic 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vgmusic 1.0.2
File Size Uploaded Provenance
vgmusic-1.0.2.tar.gz 1.5 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vgmusic 1.0.2
File Interpreter ABI Platform
vgmusic-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / vgmusic-1.0.2.tar.gz

Download URL vgmusic-1.0.2.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
3803a3e4d40ff65023fd1bf1b6b1d3cc174aedeb06a0b32e848bf589d7f95cd3
BLAKE2b-256 checksum
How to use checksums
cebe5d0eee15ef990614e10eb3e75e37534bbfedfa9ef0d5b73eaf73c2bf4e0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / vgmusic-1.0.2-py3-none-any.whl

Download URL vgmusic-1.0.2-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3800c455aa72cee30ea7459219b6872f996487b5723614c4cf7848c3bd84bc5
BLAKE2b-256 checksum
How to use checksums
025c70e6ea95cd87de4cacc7d321ebe842cf5c0251cb7438bf112ba0a8bd1fb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Security for vgmusic 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page