%global _empty_manifest_terminate_build 0 Name: python-polystores Version: 0.2.5 Release: 1 Summary: Polystores is an abstraction and a collection of clients to interact with cloud storages. License: MIT URL: https://github.com/polyaxon/polystores Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f1/1d/cee828e30e3bba6f8baf1787963aa3dc90ec8ff8ee088606fcc75bac25c3/polystores-0.2.5.tar.gz BuildArch: noarch Requires: python3-rhea Requires: python3-azure-storage Requires: python3-google-cloud-storage Requires: python3-boto3 Requires: python3-botocore %description [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) [![Build Status](https://travis-ci.com/polyaxon/polystores.svg?branch=master)](https://travis-ci.com/polyaxon/polystores) [![PyPI version](https://badge.fury.io/py/polystores.svg)](https://badge.fury.io/py/polystores) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a33947d729f94f5da7f7390dfeef7f94)](https://www.codacy.com/app/polyaxon/polystores?utm_source=github.com&utm_medium=referral&utm_content=polyaxon/polystores&utm_campaign=Badge_Grade) [![Slack](https://img.shields.io/badge/chat-on%20slack-aadada.svg?logo=slack&longCache=true)](https://join.slack.com/t/polyaxon/shared_invite/enQtMzQ0ODc2MDg1ODc0LWY2ZTdkMTNmZjBlZmRmNjQxYmYwMTBiMDZiMWJhODI2ZTk0MDU4Mjg5YzA5M2NhYzc5ZjhiMjczMDllYmQ2MDg) # polystores Polystores is an abstraction and a collection of clients to interact with cloud storages. ## Install ```bash $ pip install -U polystores ``` N.B. this module does not include by default the cloud storage's client requirements to keep the library lightweight, the user needs to install the appropriate module to use with `polystores`. ### Install S3 ```bash pip install -U polystores[s3] ``` ### Install GCS ```bash pip install -U polystores[gcs] ``` ### Install Azure Storage ```bash pip install -U polystores[azure] ``` ## Stores This module includes clients and stores abstraction that can be used to interact with AWS S3, Azure Storage, and Google Cloud Storage. ## S3 ### Normal instantiation ```python from polystores.stores.s3_store import S3Store s3_store = S3Store(endpoint_url=..., access_key_id=..., secret_access_key=..., session_token=..., region=...) ``` ### Using env vars ```bash export AWS_ENDPOINT_URL=... export AWS_ACCESS_KEY_ID=... export AWS_SECRET_ACCESS_KEY=... export AWS_SECURITY_TOKEN=... exprot AWS_REGION=... ``` And then you can instantiate the store ```python from polystores.stores.s3_store import S3Store s3_store = S3Store() ``` ### Using a client ```python from polystores.stores.s3_store import S3Store s3_store = S3Store(client=client) ``` ### Important methods ```python s3_store.list(bucket_name, prefix='', delimiter='', page_size=None, max_items=None, keys=True, prefixes=True) s3_store.list_prefixes(bucket_name, prefix='', delimiter='', page_size=None, max_items=None) s3_store.list_keys(bucket_name, prefix='', delimiter='', page_size=None, max_items=None) s3_store.check_key(key, bucket_name=None) s3_store.get_key(key, bucket_name=None) s3_store.read_key(key, bucket_name=None) s3_store.upload_bytes(bytes_data, key, bucket_name=None, overwrite=False, encrypt=False, acl=None) s3_store.upload_string(string_data, key, bucket_name=None, overwrite=False, encrypt=False, acl=None, encoding='utf-8') s3_store.upload_file(filename, key, bucket_name=None, overwrite=False, encrypt=False, acl=None, use_basename=True) s3_store.download_file(key, local_path, bucket_name=None, use_basename=True) s3_store.upload_dir(dirname, key, bucket_name=None, overwrite=False, encrypt=False, acl=None, use_basename=True) s3_store.download_dir(key, local_path, bucket_name=None, use_basename=True) ``` ## GCS ### Normal instantiation ```python from polystores.stores.gcs_store import GCSStore gcs_store = GCSStore(project_id=..., credentials=..., key_path=..., key_path=..., scopes=...) ``` ### Using a client ```python from polystores.stores.gcs_store import GCSStore gcs_store = GCSStore(client=client) ``` ### Important methods ```python gcs_store.list(key, bucket_name=None, path=None, delimiter='/', blobs=True, prefixes=True) gcs_store.upload_file(filename, blob, bucket_name=None, use_basename=True) gcs_store.download_file(blob, local_path, bucket_name=None, use_basename=True) gcs_store.upload_dir(dirname, blob, bucket_name=None, use_basename=True) gcs_store.download_dir(blob, local_path, bucket_name=None, use_basename=True) ``` ## Azure Storage ### Normal instantiation ```python from polystores.stores.azure_store import AzureStore az_store = AzureStore(account_name=..., account_key=..., connection_string=...) ``` ### Using env vars ```bash export AZURE_ACCOUNT_NAME=... export AZURE_ACCOUNT_KEY=... export AZURE_CONNECTION_STRING=... ``` And then you can instantiate the store ```python from polystores.stores.azure_store import AzureStore az_store = AzureStore() ``` ### Using a client ```python from polystores.stores.azure_store import AzureStore az_store = AzureStore(client=client) ``` ### Important methods ```python az_store.list(key, container_name=None, path=None, delimiter='/', blobs=True, prefixes=True) az_store.upload_file(filename, blob, container_name=None, use_basename=True) az_store.download_file(blob, local_path, container_name=None, use_basename=True) az_store.upload_dir(dirname, blob, container_name=None, use_basename=True) az_store.download_dir(blob, local_path, container_name=None, use_basename=True) ``` ## Running tests ``` pytest ``` ## License [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpolyaxon%2Fpolystores.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fpolyaxon%2Fpolystores?ref=badge_large) %package -n python3-polystores Summary: Polystores is an abstraction and a collection of clients to interact with cloud storages. Provides: python-polystores BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-polystores [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) [![Build Status](https://travis-ci.com/polyaxon/polystores.svg?branch=master)](https://travis-ci.com/polyaxon/polystores) [![PyPI version](https://badge.fury.io/py/polystores.svg)](https://badge.fury.io/py/polystores) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a33947d729f94f5da7f7390dfeef7f94)](https://www.codacy.com/app/polyaxon/polystores?utm_source=github.com&utm_medium=referral&utm_content=polyaxon/polystores&utm_campaign=Badge_Grade) [![Slack](https://img.shields.io/badge/chat-on%20slack-aadada.svg?logo=slack&longCache=true)](https://join.slack.com/t/polyaxon/shared_invite/enQtMzQ0ODc2MDg1ODc0LWY2ZTdkMTNmZjBlZmRmNjQxYmYwMTBiMDZiMWJhODI2ZTk0MDU4Mjg5YzA5M2NhYzc5ZjhiMjczMDllYmQ2MDg) # polystores Polystores is an abstraction and a collection of clients to interact with cloud storages. ## Install ```bash $ pip install -U polystores ``` N.B. this module does not include by default the cloud storage's client requirements to keep the library lightweight, the user needs to install the appropriate module to use with `polystores`. ### Install S3 ```bash pip install -U polystores[s3] ``` ### Install GCS ```bash pip install -U polystores[gcs] ``` ### Install Azure Storage ```bash pip install -U polystores[azure] ``` ## Stores This module includes clients and stores abstraction that can be used to interact with AWS S3, Azure Storage, and Google Cloud Storage. ## S3 ### Normal instantiation ```python from polystores.stores.s3_store import S3Store s3_store = S3Store(endpoint_url=..., access_key_id=..., secret_access_key=..., session_token=..., region=...) ``` ### Using env vars ```bash export AWS_ENDPOINT_URL=... export AWS_ACCESS_KEY_ID=... export AWS_SECRET_ACCESS_KEY=... export AWS_SECURITY_TOKEN=... exprot AWS_REGION=... ``` And then you can instantiate the store ```python from polystores.stores.s3_store import S3Store s3_store = S3Store() ``` ### Using a client ```python from polystores.stores.s3_store import S3Store s3_store = S3Store(client=client) ``` ### Important methods ```python s3_store.list(bucket_name, prefix='', delimiter='', page_size=None, max_items=None, keys=True, prefixes=True) s3_store.list_prefixes(bucket_name, prefix='', delimiter='', page_size=None, max_items=None) s3_store.list_keys(bucket_name, prefix='', delimiter='', page_size=None, max_items=None) s3_store.check_key(key, bucket_name=None) s3_store.get_key(key, bucket_name=None) s3_store.read_key(key, bucket_name=None) s3_store.upload_bytes(bytes_data, key, bucket_name=None, overwrite=False, encrypt=False, acl=None) s3_store.upload_string(string_data, key, bucket_name=None, overwrite=False, encrypt=False, acl=None, encoding='utf-8') s3_store.upload_file(filename, key, bucket_name=None, overwrite=False, encrypt=False, acl=None, use_basename=True) s3_store.download_file(key, local_path, bucket_name=None, use_basename=True) s3_store.upload_dir(dirname, key, bucket_name=None, overwrite=False, encrypt=False, acl=None, use_basename=True) s3_store.download_dir(key, local_path, bucket_name=None, use_basename=True) ``` ## GCS ### Normal instantiation ```python from polystores.stores.gcs_store import GCSStore gcs_store = GCSStore(project_id=..., credentials=..., key_path=..., key_path=..., scopes=...) ``` ### Using a client ```python from polystores.stores.gcs_store import GCSStore gcs_store = GCSStore(client=client) ``` ### Important methods ```python gcs_store.list(key, bucket_name=None, path=None, delimiter='/', blobs=True, prefixes=True) gcs_store.upload_file(filename, blob, bucket_name=None, use_basename=True) gcs_store.download_file(blob, local_path, bucket_name=None, use_basename=True) gcs_store.upload_dir(dirname, blob, bucket_name=None, use_basename=True) gcs_store.download_dir(blob, local_path, bucket_name=None, use_basename=True) ``` ## Azure Storage ### Normal instantiation ```python from polystores.stores.azure_store import AzureStore az_store = AzureStore(account_name=..., account_key=..., connection_string=...) ``` ### Using env vars ```bash export AZURE_ACCOUNT_NAME=... export AZURE_ACCOUNT_KEY=... export AZURE_CONNECTION_STRING=... ``` And then you can instantiate the store ```python from polystores.stores.azure_store import AzureStore az_store = AzureStore() ``` ### Using a client ```python from polystores.stores.azure_store import AzureStore az_store = AzureStore(client=client) ``` ### Important methods ```python az_store.list(key, container_name=None, path=None, delimiter='/', blobs=True, prefixes=True) az_store.upload_file(filename, blob, container_name=None, use_basename=True) az_store.download_file(blob, local_path, container_name=None, use_basename=True) az_store.upload_dir(dirname, blob, container_name=None, use_basename=True) az_store.download_dir(blob, local_path, container_name=None, use_basename=True) ``` ## Running tests ``` pytest ``` ## License [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpolyaxon%2Fpolystores.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fpolyaxon%2Fpolystores?ref=badge_large) %package help Summary: Development documents and examples for polystores Provides: python3-polystores-doc %description help [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) [![Build Status](https://travis-ci.com/polyaxon/polystores.svg?branch=master)](https://travis-ci.com/polyaxon/polystores) [![PyPI version](https://badge.fury.io/py/polystores.svg)](https://badge.fury.io/py/polystores) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a33947d729f94f5da7f7390dfeef7f94)](https://www.codacy.com/app/polyaxon/polystores?utm_source=github.com&utm_medium=referral&utm_content=polyaxon/polystores&utm_campaign=Badge_Grade) [![Slack](https://img.shields.io/badge/chat-on%20slack-aadada.svg?logo=slack&longCache=true)](https://join.slack.com/t/polyaxon/shared_invite/enQtMzQ0ODc2MDg1ODc0LWY2ZTdkMTNmZjBlZmRmNjQxYmYwMTBiMDZiMWJhODI2ZTk0MDU4Mjg5YzA5M2NhYzc5ZjhiMjczMDllYmQ2MDg) # polystores Polystores is an abstraction and a collection of clients to interact with cloud storages. ## Install ```bash $ pip install -U polystores ``` N.B. this module does not include by default the cloud storage's client requirements to keep the library lightweight, the user needs to install the appropriate module to use with `polystores`. ### Install S3 ```bash pip install -U polystores[s3] ``` ### Install GCS ```bash pip install -U polystores[gcs] ``` ### Install Azure Storage ```bash pip install -U polystores[azure] ``` ## Stores This module includes clients and stores abstraction that can be used to interact with AWS S3, Azure Storage, and Google Cloud Storage. ## S3 ### Normal instantiation ```python from polystores.stores.s3_store import S3Store s3_store = S3Store(endpoint_url=..., access_key_id=..., secret_access_key=..., session_token=..., region=...) ``` ### Using env vars ```bash export AWS_ENDPOINT_URL=... export AWS_ACCESS_KEY_ID=... export AWS_SECRET_ACCESS_KEY=... export AWS_SECURITY_TOKEN=... exprot AWS_REGION=... ``` And then you can instantiate the store ```python from polystores.stores.s3_store import S3Store s3_store = S3Store() ``` ### Using a client ```python from polystores.stores.s3_store import S3Store s3_store = S3Store(client=client) ``` ### Important methods ```python s3_store.list(bucket_name, prefix='', delimiter='', page_size=None, max_items=None, keys=True, prefixes=True) s3_store.list_prefixes(bucket_name, prefix='', delimiter='', page_size=None, max_items=None) s3_store.list_keys(bucket_name, prefix='', delimiter='', page_size=None, max_items=None) s3_store.check_key(key, bucket_name=None) s3_store.get_key(key, bucket_name=None) s3_store.read_key(key, bucket_name=None) s3_store.upload_bytes(bytes_data, key, bucket_name=None, overwrite=False, encrypt=False, acl=None) s3_store.upload_string(string_data, key, bucket_name=None, overwrite=False, encrypt=False, acl=None, encoding='utf-8') s3_store.upload_file(filename, key, bucket_name=None, overwrite=False, encrypt=False, acl=None, use_basename=True) s3_store.download_file(key, local_path, bucket_name=None, use_basename=True) s3_store.upload_dir(dirname, key, bucket_name=None, overwrite=False, encrypt=False, acl=None, use_basename=True) s3_store.download_dir(key, local_path, bucket_name=None, use_basename=True) ``` ## GCS ### Normal instantiation ```python from polystores.stores.gcs_store import GCSStore gcs_store = GCSStore(project_id=..., credentials=..., key_path=..., key_path=..., scopes=...) ``` ### Using a client ```python from polystores.stores.gcs_store import GCSStore gcs_store = GCSStore(client=client) ``` ### Important methods ```python gcs_store.list(key, bucket_name=None, path=None, delimiter='/', blobs=True, prefixes=True) gcs_store.upload_file(filename, blob, bucket_name=None, use_basename=True) gcs_store.download_file(blob, local_path, bucket_name=None, use_basename=True) gcs_store.upload_dir(dirname, blob, bucket_name=None, use_basename=True) gcs_store.download_dir(blob, local_path, bucket_name=None, use_basename=True) ``` ## Azure Storage ### Normal instantiation ```python from polystores.stores.azure_store import AzureStore az_store = AzureStore(account_name=..., account_key=..., connection_string=...) ``` ### Using env vars ```bash export AZURE_ACCOUNT_NAME=... export AZURE_ACCOUNT_KEY=... export AZURE_CONNECTION_STRING=... ``` And then you can instantiate the store ```python from polystores.stores.azure_store import AzureStore az_store = AzureStore() ``` ### Using a client ```python from polystores.stores.azure_store import AzureStore az_store = AzureStore(client=client) ``` ### Important methods ```python az_store.list(key, container_name=None, path=None, delimiter='/', blobs=True, prefixes=True) az_store.upload_file(filename, blob, container_name=None, use_basename=True) az_store.download_file(blob, local_path, container_name=None, use_basename=True) az_store.upload_dir(dirname, blob, container_name=None, use_basename=True) az_store.download_dir(blob, local_path, container_name=None, use_basename=True) ``` ## Running tests ``` pytest ``` ## License [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpolyaxon%2Fpolystores.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fpolyaxon%2Fpolystores?ref=badge_large) %prep %autosetup -n polystores-0.2.5 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-polystores -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Apr 11 2023 Python_Bot - 0.2.5-1 - Package Spec generated