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 itemsutils
: 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:
- Check out latest
opengamedata-server
. - Run
pip install -r requirements.txt
to ensure you've got flask. - Run
flask run
. - 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file opengamedata_api_utils-1.1.0.tar.gz
.
File metadata
- Download URL: opengamedata_api_utils-1.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afe6868760fa65e3b107c89b19ce8dd2b27954a342bbdcbacdb843b9b691ede3 |
|
MD5 | 64ada97827f9fc3a3476ca1d27259dda |
|
BLAKE2b-256 | 44c868cb8e7aa40b8a8ee1117e0b9ff075272f597090b86a65863fe16a260549 |
File details
Details for the file opengamedata_api_utils-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: opengamedata_api_utils-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0aa69f589bb99464a4fe547fa83cae7dfec817754fc660fd72a1c664d727ce7 |
|
MD5 | 0bfb0447a72d9e1416b1bf0c89340d19 |
|
BLAKE2b-256 | 8df743a1f63087da548432548977b689b0398055f12acd6f0e53678713011612 |