Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

VNG-API

A async API client for the game "Von Neumann Game" by Gnieark

Example use

Start crafting Steel Bars with all free mannies on Probe with ID 420

from vng_api.client import APIClient
import asyncio

async def main():
    client = APIClient('my_token')
    # get all mannies of the probe with ID 420
    ret, mannies = await client.probe.manny.get_all(420)
    # check if the API call was successfull
    if not ret.success:
        raise Exception(f'Failed to get mannies of probe: {ret.error_code}: {ret.error_message}')
    # create context manager for mannie tasks on probe 420
    tasks = client.probe.manny.tasks(420)
    async with tasks:
        # queue the crafting task for each manny
        for manny in mannies.values():
            if manny.currentTask is None and manny.location.type == 'probe':
                await tasks.craft(manny.id, 'steel_bar')
    # check if the API calls of the task batching where successfull
    if not tasks.results.success:
        # get the batches that failed and compile error message
        failed = filter(lambda inp: not inp.success, tasks.results.responses)
        raise Exception(f'Failed to tasks mannies:\n{'\n'.join([f'- {f.error_code}: {f.error_message}' for f in failed])}')

asyncio.run(main())

Basic Principles

TODO

Metadata

Release files for vng-api 1.140.0a3

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

Source distribution (sdist)

Source distribution for vng-api 1.140.0a3
File Size Uploaded Provenance Actions
vng_api-1.140.0a3.tar.gz 34.3 kB Without provenance Details for vng_api-1.140.0a3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vng-api 1.140.0a3
File Interpreter ABI Platform Actions
vng_api-1.140.0a3-py3-none-any.whl Python 3 none any Details for vng_api-1.140.0a3-py3-none-any.whl

Total release size: 83.3 kB

Release files / vng_api-1.140.0a3.tar.gz

Download URL vng_api-1.140.0a3.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8ea249fe8027c1e28c5206a0bc560595993594853a5dc9269f2bf2a3ba0337af
BLAKE2b-256 checksum
How to use checksums
4a80c146f01a79276be55be67fd83b71b4ace764de27ae7f0ff5031544c51b2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.1

Release files / vng_api-1.140.0a3-py3-none-any.whl

Download URL vng_api-1.140.0a3-py3-none-any.whl
Size 49.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93a7575d36f9fd8852b05c8f83d381388d304937b83b9de39b8caabc0961ae96
BLAKE2b-256 checksum
How to use checksums
83043d0d27f1ae5ab2153e3d34e914fdc856f96651e5470a82ea0623e9ec686f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.1

Security for vng-api 1.140.0a3

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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