Skip to content
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
23 changes: 12 additions & 11 deletions docs/api/python/store.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
====================
Object Store support
====================

Vortex arrays support reading and writing to object storage systems such as, S3, Google Cloud Storage, and
Azure Blob Storage.

.. autosummary::
:nosignatures:

.. raw:: html
Vortex arrays support reading and writing to many object storage systems:

<hr>
.. toctree::
:maxdepth: 1

.. automodule:: vortex.store
:members:
:imported-members:
store/aws
store/gcs
store/azure
store/http
store/local
store/memory
store/config

.. autofunction:: vortex.store.from_url
20 changes: 20 additions & 0 deletions docs/api/python/store/aws.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
====================
S3 and S3-compatible
====================


.. autosummary::
vortex.store.S3Store
vortex.store.S3Config
vortex.store.S3Credential
vortex.store.S3CredentialProvider

.. autoclass:: vortex.store.S3Store
:members:
.. autoclass:: vortex.store.S3Config
:members:
.. autoclass:: vortex.store.S3Credential
:members:
.. autoclass:: vortex.store.S3CredentialProvider
:members:

29 changes: 29 additions & 0 deletions docs/api/python/store/azure.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
==================
Azure Blob Storage
==================

.. autosummary::
vortex.store.AzureStore
vortex.store.AzureConfig
vortex.store.AzureAccessKey
vortex.store.AzureSASToken
vortex.store.AzureBearerToken
vortex.store.AzureCredential
vortex.store.AzureCredentialProvider


.. autoclass:: vortex.store.AzureStore
:members:
.. autoclass:: vortex.store.AzureConfig
:members:
.. autoclass:: vortex.store.AzureAccessKey
:members:
.. autoclass:: vortex.store.AzureSASToken
:members:
.. autoclass:: vortex.store.AzureBearerToken
:members:
.. autoclass:: vortex.store.AzureCredential
:members:
.. autoclass:: vortex.store.AzureCredentialProvider
:members:

16 changes: 16 additions & 0 deletions docs/api/python/store/config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
====================
Common Configuration
====================

.. autosummary::
vortex.store.ClientConfig
vortex.store.RetryConfig
vortex.store.BackoffConfig


.. autoclass:: vortex.store.ClientConfig
:members:
.. autoclass:: vortex.store.RetryConfig
:members:
.. autoclass:: vortex.store.BackoffConfig
:members:
18 changes: 18 additions & 0 deletions docs/api/python/store/gcs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
====================
Google Cloud Storage
====================

.. autosummary::
vortex.store.GCSStore
vortex.store.GCSConfig
vortex.store.GCSCredential
vortex.store.GCSCredentialProvider

.. autoclass:: vortex.store.GCSStore
:members:
.. autoclass:: vortex.store.GCSConfig
:members:
.. autoclass:: vortex.store.GCSCredential
:members:
.. autoclass:: vortex.store.GCSCredentialProvider
:members:
6 changes: 6 additions & 0 deletions docs/api/python/store/http.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
====
HTTP
====

.. autoclass:: vortex.store.HTTPStore
:members:
6 changes: 6 additions & 0 deletions docs/api/python/store/local.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=====
Local
=====

.. autoclass:: vortex.store.LocalStore
:members:
6 changes: 6 additions & 0 deletions docs/api/python/store/memory.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
======
Memory
======

.. autoclass:: vortex.store.MemoryStore
:members:
2 changes: 1 addition & 1 deletion docs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = [
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.6.0",
"sphinx-inline-tabs>=2023.4.21",
"sphinx>=8.0.2",
"sphinx>=9.0.0",
"sphinxcontrib-bibtex>=2.6.3",
"sphinxcontrib-mermaid>=1.0.0",
"sphinxext-opengraph>=0.9.1",
Expand Down
136 changes: 91 additions & 45 deletions uv.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vortex-python/python/vortex/_lib/store/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ class LocalStore:
```
"""

def __init__(
def __new__(
self,
prefix: str | Path | None = None,
*,
automatic_cleanup: bool = False,
mkdir: bool = False,
) -> None:
) -> Self:
"""Create a new LocalStore.

Args:
Expand Down
6 changes: 3 additions & 3 deletions vortex-python/python/vortex/_lib/store/_aws.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ class S3Store:
set in the environment.
"""

def __init__( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "bucket"
self,
def __new__( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "bucket"
cls,
bucket: str | None = None,
*,
prefix: str | None = None,
Expand All @@ -467,7 +467,7 @@ class S3Store:
retry_config: RetryConfig | None = None,
credential_provider: S3CredentialProvider | None = None,
**kwargs: Unpack[S3Config], # type: ignore # noqa: PGH003 (bucket key overlaps with positional arg)
) -> None:
) -> Self:
"""Create a new S3Store.

Args:
Expand Down
6 changes: 3 additions & 3 deletions vortex-python/python/vortex/_lib/store/_azure.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ class AzureStore:
[`AzureConfig`][vortex.store.AzureConfig] for valid environment variables.
"""

def __init__( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "container_name"
self,
def __new__( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "container_name"
cls,
container_name: str | None = None,
*,
prefix: str | None = None,
Expand All @@ -325,7 +325,7 @@ class AzureStore:
retry_config: RetryConfig | None = None,
credential_provider: AzureCredentialProvider | None = None,
**kwargs: Unpack[AzureConfig], # type: ignore # noqa: PGH003 (container_name key overlaps with positional arg)
) -> None:
) -> Self:
"""Construct a new AzureStore.

Args:
Expand Down
6 changes: 3 additions & 3 deletions vortex-python/python/vortex/_lib/store/_gcs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ class GCSStore:
[here](https://cloud.google.com/docs/authentication/application-default-credentials).
"""

def __init__( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "bucket"
self,
def __new__( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "bucket"
cls,
bucket: str | None = None,
*,
prefix: str | None = None,
Expand All @@ -144,7 +144,7 @@ class GCSStore:
retry_config: RetryConfig | None = None,
credential_provider: GCSCredentialProvider | None = None,
**kwargs: Unpack[GCSConfig], # type: ignore # noqa: PGH003 (bucket key overlaps with positional arg)
) -> None:
) -> Self:
"""Construct a new GCSStore.

Args:
Expand Down
4 changes: 2 additions & 2 deletions vortex-python/python/vortex/_lib/store/_http.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ from ._retry import RetryConfig
class HTTPStore:
"""Configure a connection to a generic HTTP server."""

def __init__(
def __new__(
self,
url: str,
*,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
) -> None:
) -> Self:
"""Construct a new HTTPStore from a URL.

Any path on the URL will be assigned as the `prefix` for the store. So if you
Expand Down
67 changes: 0 additions & 67 deletions vortex-python/python/vortex/store.py

This file was deleted.

21 changes: 21 additions & 0 deletions vortex-python/python/vortex/store/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Development Seed

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading