Update README
This commit is contained in:
Родитель
d43578c89f
Коммит
b77b6ec8d2
78
README.md
78
README.md
|
@ -1,14 +1,72 @@
|
|||
# Project
|
||||
# Planetary Computer SDK for Python
|
||||
|
||||
> This repo has been populated by an initial template to help get you started. Please
|
||||
> make sure to update the content to build a great experience for community-building.
|
||||
Python library for interacting with the Microsoft Planetary Computer.
|
||||
|
||||
As the maintainer of this project, please make a few updates:
|
||||
## Installation
|
||||
|
||||
```python
|
||||
pip install planetarycomputer
|
||||
```
|
||||
|
||||
If you have an API subscription key, you may provide it to the library by using the included configuration CLI:
|
||||
|
||||
```bash
|
||||
planetarycomputer configure
|
||||
```
|
||||
|
||||
Alternatively, a subscription key may be provided by specifying it in the `PC_SDK_SUBSCRIPTION_KEY` environment variable. A subcription key is not required for interacting with the service, however having one in place allows for less restricted rate limiting.
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
The following steps may be followed in order to develop locally:
|
||||
|
||||
```bash
|
||||
## Create and activate venv
|
||||
python3 -m venv env
|
||||
source env/bin/activate
|
||||
|
||||
## Install requirements
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 -m pip install -r requirements-dev.txt
|
||||
|
||||
## Install locally
|
||||
pip install -e .
|
||||
|
||||
## Format code
|
||||
./scripts/format
|
||||
|
||||
## Run tests
|
||||
./scripts/test
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
This library currently assists with signing Azure Blob Storage URLs, both within PySTAC assets, and by providing raw URLs. The following examples demonstrate both of these use cases:
|
||||
|
||||
```python
|
||||
import pystac
|
||||
import planetary_computer as pc
|
||||
|
||||
raw_item: pystac.Item = ...
|
||||
item: pystac.Item = pc.sign_assets(raw_item)
|
||||
|
||||
# Now use the item however you want. All appropriate assets are signed for read access.
|
||||
```
|
||||
|
||||
```python
|
||||
import planetary_computer as pc
|
||||
import pystac
|
||||
|
||||
item: pystac.Item = ... # Landsat item
|
||||
|
||||
b4_href = pc.sign(item.assets['SR_B4'].href)
|
||||
|
||||
with rasterio.open(b4_href) as ds:
|
||||
...
|
||||
```
|
||||
|
||||
- Improving this README.MD file to provide a great experience
|
||||
- Updating SUPPORT.MD with content about this project's support experience
|
||||
- Understanding the security reporting process in SECURITY.MD
|
||||
- Remove this section from the README
|
||||
|
||||
## Contributing
|
||||
|
||||
|
@ -26,8 +84,8 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio
|
|||
|
||||
## Trademarks
|
||||
|
||||
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
|
||||
trademarks or logos is subject to and must follow
|
||||
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
|
||||
trademarks or logos is subject to and must follow
|
||||
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
|
||||
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
||||
Any use of third-party trademarks or logos are subject to those third-party's policies.
|
||||
|
|
22
SUPPORT.md
22
SUPPORT.md
|
@ -1,25 +1,11 @@
|
|||
# TODO: The maintainer of this repo has not yet edited this file
|
||||
|
||||
**REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project?
|
||||
|
||||
- **No CSS support:** Fill out this template with information about how to file issues and get help.
|
||||
- **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport).
|
||||
- **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide.
|
||||
|
||||
*Then remove this first heading from this SUPPORT.MD file before publishing your repo.*
|
||||
|
||||
# Support
|
||||
|
||||
## How to file issues and get help
|
||||
## How to file issues and get help
|
||||
|
||||
This project uses GitHub Issues to track bugs and feature requests. Please search the existing
|
||||
issues before filing new issues to avoid duplicates. For new issues, file your bug or
|
||||
This project uses GitHub Issues to track bugs and feature requests. Please search the existing
|
||||
issues before filing new issues to avoid duplicates. For new issues, file your bug or
|
||||
feature request as a new Issue.
|
||||
|
||||
For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE
|
||||
FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER
|
||||
CHANNEL. WHERE WILL YOU HELP PEOPLE?**.
|
||||
|
||||
## Microsoft Support Policy
|
||||
## Microsoft Support Policy
|
||||
|
||||
Support for this **PROJECT or PRODUCT** is limited to the resources listed above.
|
||||
|
|
Загрузка…
Ссылка в новой задаче