CA Biositing Web Service
FastAPI REST API for the CA Biositing project — serving biomass feedstock data including USDA Census/Survey statistics and laboratory analysis results.
Shares database models with the companion
ca-biositing-datamodels
package.
Installation
pip install ca-biositing-webservice
Quick Start
uvicorn ca_biositing.webservice.main:app --reload
Interactive docs at http://localhost:8000/docs.
API Overview
| Endpoint Family | Base Path | Description |
|---|---|---|
| Auth | /v1/auth/token |
JWT access tokens |
| Analysis | /v1/feedstocks/analysis/ |
Lab analysis data by resource and location |
| USDA Census | /v1/feedstocks/usda/census/ |
USDA Census data by crop or resource |
| USDA Survey | /v1/feedstocks/usda/survey/ |
USDA Survey data by crop or resource |
Each family includes discovery endpoints returning available crops, resources, geoids, and parameters. All lookups are case-insensitive.
Key Dependencies
ca-biositing-datamodels— shared database models- FastAPI — web framework
- Uvicorn — ASGI server
- PyJWT — JWT authentication
Links
Contributors
Acknowledgement
We acknowledge software engineering support from the University of Washington Scientific Software Engineering Center (SSEC), as part of the Schmidt Sciences Virtual Institute for Scientific Software (VISS).
License
CA Biositing Web Service is licensed under the open source BSD 3-Clause License.