Skip to content

docs: Remove references to obstore #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ classifiers = [
]

[project.urls]
homepage = "https://developmentseed.org/obstore/latest/"
documentation = "https://developmentseed.org/obstore/latest/"
repository = "https://github.com/developmentseed/obstore"
issues = "https://github.com/developmentseed/obstore/issues"
changelog = "https://github.com/developmentseed/obstore/blob/main/obspec/CHANGELOG.md"
homepage = "https://developmentseed.org/obspec/latest/"
documentation = "https://developmentseed.org/obspec/latest/"
repository = "https://github.com/developmentseed/obspec"
issues = "https://github.com/developmentseed/obspec/issues"
changelog = "https://github.com/developmentseed/obspec/blob/main/obspec/CHANGELOG.md"

[build-system]
requires = ["hatchling"]
Expand Down
64 changes: 0 additions & 64 deletions src/obspec/_exceptions.py

This file was deleted.

24 changes: 12 additions & 12 deletions src/obspec/_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,18 @@ def list(
Synchronously iterate through list results:

```py
import obstore as obs
from obstore.store import MemoryStore

store = MemoryStore()
for i in range(100):
obs.put(store, f"file{i}.txt", b"foo")

stream = obs.list(store, chunk_size=10)
for list_result in stream:
print(list_result[0])
# {'path': 'file0.txt', 'last_modified': datetime.datetime(2024, 10, 23, 19, 19, 28, 781723, tzinfo=datetime.timezone.utc), 'size': 3, 'e_tag': '0', 'version': None}
break
import obspec

def upload_files(client: obspec.Put):
for i in range(100):
client.put(f"file{i}.txt", b"foo")

def list_files(client: obspec.List):
stream = client.list(chunk_size=10)
for list_result in stream:
print(list_result[0])
# {'path': 'file0.txt', 'last_modified': datetime.datetime(2024, 10, 23, 19, 19, 28, 781723, tzinfo=datetime.timezone.utc), 'size': 3, 'e_tag': '0', 'version': None}
break
```

!!! note
Expand Down
19 changes: 13 additions & 6 deletions src/obspec/_put.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,19 @@ async def put_async( # noqa: PLR0913
operation:

```py
import obstore as obs

# This only constructs the stream, it doesn't materialize the data in memory
resp = await obs.get_async(store1, path1)
# A streaming upload is created to copy the file to path2
await obs.put_async(store2, path2)
from obspec import GetAsync, PutAsync


async def streaming_copy(
fetch_client: GetAsync,
put_client: PutAsync,
path1: str,
path2: str,
):
# This only constructs the stream, it doesn't materialize the data in memory
resp = await fetch_client.get_async(path1)
# A streaming upload is created to copy the file to path2
await put_client.put_async(path2, resp)
```
"""
...
Loading