Skip to main content

Package of utilities for server-side scripts in OpenGameData.

Project description

opengamedata-api-utils

Repository for utility server-side script and classes used by OpenGameData APIs.

Contents

Python Package

The utils repository contains a package that can be installed from pip, and places its classes under the ogd.apis namespace. The available modules include:

  • HelloAPI.py : Class for creating a "Hello, World" API to aid in testing deploys of other APIs.
  • schemas : Contains a base class for server config schemas to handle version and debug-level config items
  • utils : Contains helper classes for API requests and responses, as well as general-purpose parsing and setup functions.

Data Store Utilities

The store directory contains a script for reindexing a folder of OGD datasets after new datasets have been added. This index is used by the FileAPI to check what datasets are available on the server.

Getting Started

Hello World of Flask

Steps to run:

  1. Check out latest opengamedata-server.
  2. Run pip install -r requirements.txt to ensure you've got flask.
  3. Run flask run.
  4. Open localhost:5000 or localhost:5000/hello to see some really basic text output from the Flask server.

If Flask doesn't run, it's possible you'd need to first export FLASK_APP as an environment variable, set to "wsgi" (so in Bash, export FLASK_APP=wsgi). However, the script is named wsgi.py specifically because Flask is supposed to auto-detect it. So if this issue ever did come up, please ping Luke so he can look into it.

Testing in VS Code

Be sure to add the following to .vscode/settings.json in your local checkout:

   "python.testing.unittestEnabled": true,
   "python.testing.unittestArgs": [
      "-v",
      "-s",
      "./tests/cases",
      "-t",
      "./",
      "-p",
      "t_*.py"
   ],

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

opengamedata_api_utils-1.5.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opengamedata_api_utils-1.5.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file opengamedata_api_utils-1.5.0.tar.gz.

File metadata

  • Download URL: opengamedata_api_utils-1.5.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opengamedata_api_utils-1.5.0.tar.gz
Algorithm Hash digest
SHA256 d31ac788b04801227ad36d05e277c9e0fcd9d801361ec0e6ed3c84f389e9307f
MD5 f7b5f7cdef646f70629e95f1412baa6d
BLAKE2b-256 2520f77677e0942cb643f8c8d1521357e641902e9c79c2b9cb176d51dfe3b19e

See more details on using hashes here.

Provenance

The following attestation bundles were made for opengamedata_api_utils-1.5.0.tar.gz:

Publisher: RELEASE_APIUtils.yml on opengamedata/ogd-api-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opengamedata_api_utils-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opengamedata_api_utils-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 203c6a9fa4dd988c252f396661692a2a3cbc0fdb71d0c3a3961649eae7c3503f
MD5 f9d470cda189968875125148d2056337
BLAKE2b-256 aefe4d6f083ed13e057a62715be001b2afda7c5cb5e914d00f9ee5fe2ccc62ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for opengamedata_api_utils-1.5.0-py3-none-any.whl:

Publisher: RELEASE_APIUtils.yml on opengamedata/ogd-api-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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