Skip to content

Add Python examples, How to Use, and Data License to FastAPI docs#14

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-examples-how-to-use-license
Draft

Add Python examples, How to Use, and Data License to FastAPI docs#14
Copilot wants to merge 2 commits intomainfrom
copilot/add-examples-how-to-use-license

Conversation

Copy link

Copilot AI commented Feb 24, 2026

The API lacked usage documentation, code examples, and license information in the Swagger UI — making it difficult for users to get started or understand data provenance.

Changes

  • app/core/config.py: Expanded DESCRIPTION to clearly explain what CLEAN is and what the API exposes.

  • app/main.py: Added three new markdown sections to the FastAPI app description (visible at /api/v1/docs):

    • How to Use — Base URL, endpoint list, and orientation for new users.
    • Python Examples — Six requests-based snippets covering common query patterns:
      • Search by organism / EC number
      • Filter by confidence score and curation status
      • CSV download
      • Typeahead suggestions
      • EC number lookup
    • Data License — CC BY 4.0 for UniProt data, required citation for CLEAN predictions (Yu et al., Science 2023), MIT for API source.

Example snippet (search by organism)

import requests

BASE_URL = "https://fastapi.cleandb.mmli2.ncsa.illinois.edu/api/v1"

response = requests.get(f"{BASE_URL}/search", params={"organism": "Homo sapiens"})
response.raise_for_status()
data = response.json()
for record in data["data"]:
    print(record["uniprot"], record["predicted_ec"])

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • openenzymedb-api.platform.moleculemaker.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Examples, How To Use, License</issue_title>
<issue_description>As a user, I would like to have access to the following related to the CLEANDB-API:

  1. Example Queries for FASTAPI: Similar to what we have had present for OpenEnzyme Database
    here under "Python Examples": https://openenzymedb-api.platform.moleculemaker.org/api/v1/docs

  2. Basic "How to Use" Instructions, to be added to the front-end FAQ Page, as part of an "API" tab: https://cleandb.frontend.staging.mmli2.ncsa.illinois.edu/about

Similar to what we have present for OpenEnzymeDB, here: https://openenzymedb.platform.moleculemaker.org/about/api
and here: https://openenzymedb-api.platform.moleculemaker.org/api/v1/docs

  1. Basic License Page for the API,

Similar to what we have present for OpenEnzymeDB here, under "data license": https://openenzymedb-api.platform.moleculemaker.org/api/v1/docs

and here: https://openenzymedb.platform.moleculemaker.org/about/license</issue_description>

<agent_instructions>As a user, I would like to have access to the following related to the CLEANDB-API:

Example Queries for FASTAPI: Similar to what we have had present for OpenEnzyme Database
here under "Python Examples": https://openenzymedb-api.platform.moleculemaker.org/api/v1/docs

Basic "How to Use" Instructions, to be added to the front-end FAQ Page, as part of an "API" tab: https://cleandb.frontend.staging.mmli2.ncsa.illinois.edu/about

Similar to what we have present for OpenEnzymeDB, here: https://openenzymedb.platform.moleculemaker.org/about/api
and here: https://openenzymedb-api.platform.moleculemaker.org/api/v1/docs

Basic License Page for the API,
Similar to what we have present for OpenEnzymeDB here, under "data license": https://openenzymedb-api.platform.moleculemaker.org/api/v1/docs

and here: https://openenzymedb.platform.moleculemaker.org/about/license</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: ckouder <20468259+ckouder@users.noreply.github.com>
Copilot AI changed the title [WIP] Add examples and usage instructions for CLEANDB-API Add Python examples, How to Use, and Data License to FastAPI docs Feb 24, 2026
Copilot AI requested a review from ckouder February 24, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Examples, How To Use, License

2 participants