|
1 | 1 |
|
2 | 2 | <p align="center"> |
3 | | - <p align="center">Arturo's STAC compliant API implementation.</p> |
| 3 | + <p align="center">sta.</p> |
4 | 4 | </p> |
5 | 5 |
|
6 | 6 | <p align="center"> |
7 | | - <a href="https://github.com/stac-utils/arturo-stac-api/actions?query=workflow%3Acicd" target="_blank"> |
8 | | - <img src="https://github.com/stac-utils/arturo-stac-api/workflows/arturo-stac-api/badge.svg" alt="Test"> |
| 7 | + <a href="https://github.com/stac-utils/stac-fastapi/actions?query=workflow%3Acicd" target="_blank"> |
| 8 | + <img src="https://github.com/stac-utils/stac-fastapi/workflows/stac-fastapi/badge.svg" alt="Test"> |
9 | 9 | </a> |
10 | | - <a href="https://codecov.io/gh/stac-utils/arturo-stac-api" target="_blank"> |
11 | | - <img src="https://codecov.io/gh/stac-utils/arturo-stac-api/branch/master/graph/badge.svg" alt="Coverage"> |
| 10 | + <a href="https://pypi.org/project/stac-fastapi" target="_blank"> |
| 11 | + <img src="https://img.shields.io/pypi/v/stac-fastapi?color=%2334D058&label=pypi%20package" alt="Package version"> |
12 | 12 | </a> |
13 | | - <a href="https://pypi.org/project/arturo-stac-api" target="_blank"> |
14 | | - <img src="https://img.shields.io/pypi/v/arturo-stac-api?color=%2334D058&label=pypi%20package" alt="Package version"> |
15 | | - </a> |
16 | | - <a href="https://github.com/stac-utils/arturo-stac-api/blob/master/LICENSE" target="_blank"> |
17 | | - <img src="https://img.shields.io/github/license/stac-utils/arturo-stac-api.svg" alt="Downloads"> |
| 13 | + <a href="https://github.com/stac-utils/stac-fastapi/blob/master/LICENSE" target="_blank"> |
| 14 | + <img src="https://img.shields.io/github/license/stac-utils/stac-fastapi.svg" alt="Downloads"> |
18 | 15 | </a> |
19 | 16 | </p> |
20 | 17 |
|
|
23 | 20 |
|
24 | 21 | --- |
25 | 22 |
|
26 | | -**Documentation**: [https://stac-utils.github.io/arturo-stac-api/](https://stac-utils.github.io/arturo-stac-api/) |
| 23 | +**Documentation**: [https://stac-utils.github.io/stac-fastapi/](https://stac-utils.github.io/stac-fastapi/) |
27 | 24 |
|
28 | | -**Source Code**: [https://github.com/stac-utils/arturo-stac-api](https://github.com/stac-utils/arturo-stac-api) |
| 25 | +**Source Code**: [https://github.com/stac-utils/stac-fastapi](https://github.com/stac-utils/stac-fastapi) |
29 | 26 |
|
30 | 27 | --- |
31 | 28 |
|
32 | | -Python library for building a STAC compliant FastAPI application. It provides: |
33 | | -- An API layer which enforces the [stac-api spec](https://github.com/radiantearth/stac-api-spec) and allows users |
34 | | -to customize how the API interacts with their data through dependency injection. |
35 | | -- A PostGIS implementation using [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy)/[geoalchemy2](https://geoalchemy-2.readthedocs.io/en/latest/). |
| 29 | +Python library for building a STAC compliant FastAPI application. The project is split up into several namespace |
| 30 | +packages: |
| 31 | +- **stac_fastapi.api**: An API layer which enforces the [stac-api-spec](https://github.com/radiantearth/stac-api-spec). |
| 32 | +- **stac_fastapi.extensions**: Abstract base classes for [STAC API extensions](https://github.com/radiantearth/stac-api-spec/blob/master/extensions.md) and third-party extensions. |
| 33 | +- **stac_fastapi.server**: Standalone FastAPI server for the application. |
| 34 | +- **stac_fastapi.sqlalchemy**: Postgres backend implementation with sqlalchemy. |
| 35 | +- **stac_fastapi.types**: Shared types and abstract base classes used by the library. |
36 | 36 |
|
37 | 37 | Initially developed by [arturo-ai](https://github.com/arturo-ai). |
38 | 38 |
|
39 | 39 | ``` |
40 | | -pip install arturo-stac-api |
41 | | -``` |
42 | | - |
43 | | -## Usage |
44 | | -```python |
45 | | -from stac_api.api.app import StacApi |
46 | | -from stac_api.clients.postgres.core import CoreCrudClient |
47 | | -from stac_api.clients.postgres.session import Session |
48 | | -from stac_api.config import ApiSettings |
49 | | - |
50 | | -settings = ApiSettings() |
51 | | -api = StacApi( |
52 | | - settings=settings, |
53 | | - client=CoreCrudClient( |
54 | | - session=Session(settings.reader_connection_string, settings.writer_connection_string) |
55 | | - ), |
56 | | -) |
57 | | - |
58 | | -# FastAPI application |
59 | | -app = api.app |
60 | | -``` |
61 | | - |
62 | | -## Project Structure |
63 | | -``` |
64 | | -. |
65 | | -├── alembic # Database migrations |
66 | | -│ └── versions # Migration versions |
67 | | -├── scripts # Scripts for local development |
68 | | -├── stac_api |
69 | | -│ ├── api # API layer |
70 | | -│ ├── clients |
71 | | -│ │ ├── postgres # Postgres CRUD client |
72 | | -│ │ └── tiles # OGC Tiles API client |
73 | | -│ ├── models # Pydantic and ORM models |
74 | | -│ └── utils # Helper functions |
75 | | -└── tests |
76 | | - ├── api # Test api creation |
77 | | - ├── clients # Test application logic |
78 | | - └── resources # Test api endpoints |
| 40 | +pip install stac-fastapi |
79 | 41 | ``` |
80 | 42 |
|
81 | 43 | ## Local Development |
|
0 commit comments