diff options
Diffstat (limited to 'python-pilosa.spec')
| -rw-r--r-- | python-pilosa.spec | 394 |
1 files changed, 394 insertions, 0 deletions
diff --git a/python-pilosa.spec b/python-pilosa.spec new file mode 100644 index 0000000..0cd40ed --- /dev/null +++ b/python-pilosa.spec @@ -0,0 +1,394 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pilosa +Version: 1.3.1 +Release: 1 +Summary: Python client library for Pilosa +License: BSD +URL: https://github.com/pilosa/python-pilosa +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/38/6f/4bc55896de925600be4a1368d284a1e5b69c0e6b88843c009ac4e5331154/pilosa-1.3.1.tar.gz +BuildArch: noarch + +Requires: python3-urllib3 +Requires: python3-protobuf +Requires: python3-pilosa-roaring +Requires: python3-opentracing + +%description +# Python Client for Pilosa + +<a href="https://github.com/pilosa"><img src="https://img.shields.io/badge/pilosa-1.3-blue.svg"></a> +<a href="https://pypi.python.org/pypi/pilosa"><img src="https://img.shields.io/pypi/v/pilosa.svg?maxAge=2592&updated=2"></a> +<a href="http://pilosa.readthedocs.io/en/latest/?badge=latest"><img src="https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat"></A> +<a href="https://travis-ci.org/pilosa/python-pilosa"><img src="https://api.travis-ci.org/pilosa/python-pilosa.svg?branch=master"></a> +<a href="https://coveralls.io/github/pilosa/python-pilosa?branch=master"><img src="https://coveralls.io/repos/github/pilosa/python-pilosa/badge.svg?branch=master"></a> + +<img src="https://www.pilosa.com/img/ce.svg" style="float: right" align="right" height="301"> + +Python client for Pilosa high performance distributed row index. + +## What's New? + +See: [CHANGELOG](https://github.com/pilosa/python-pilosa/blob/master/CHANGELOG.md) + +## Requirements + +* **Compatible with Pilosa 1.2 and Pilosa 1.3** +* Requires Python 2.7 and higher or Python 3.4 and higher. + +## Install + +Pilosa client is on [PyPI](https://pypi.python.org/pypi/pilosa). You can install the library using `pip`: + +``` +pip install pilosa +``` + +## Usage + +### Quick overview + +Assuming [Pilosa](https://github.com/pilosa/pilosa) server is running at `localhost:10101` (the default): + +```python +import pilosa + +# Create the default client +client = pilosa.Client() + +# Retrieve the schema +schema = client.schema() + +# Create an Index object +myindex = schema.index("myindex") + +# Create a Field object +myfield = myindex.field("myfield") + +# make sure the index and field exists on the server +client.sync_schema(schema) + +# Send a Set query. PilosaError is thrown if execution of the query fails. +client.query(myfield.set(5, 42)) + +# Send a Row query. PilosaError is thrown if execution of the query fails. +response = client.query(myfield.row(5)) + +# Get the result +result = response.result + +# Act on the result +if result: + columns = result.row.columns + print("Got columns: ", columns) + +# You can batch queries to improve throughput +response = client.query( + myindex.batch_query( + myfield.row(5), + myfield.row(10), + ) +) +for result in response.results: + # Act on the result + print(result.row.columns) +``` + +## Documentation + +### Data Model and Queries + +See: [Data Model and Queries](https://github.com/pilosa/python-pilosa/blob/master/docs/data-model-queries.md) + +### Executing Queries + +See: [Server Interaction](https://github.com/pilosa/python-pilosa/blob/master/docs/server-interaction.md) + +### Importing and Exporting Data + +See: [Importing and Exporting Data](https://github.com/pilosa/python-pilosa/blob/master/docs/imports.md) + +### Other Documentation + +* [Tracing](docs/tracing.md) + +## Contributing + +See: [CONTRIBUTING](https://github.com/pilosa/python-pilosa/blob/master/CONTRIBUTING.md) + +## License + +See: [LICENSE](https://github.com/pilosa/python-pilosa/blob/master/LICENSE) + + + + +%package -n python3-pilosa +Summary: Python client library for Pilosa +Provides: python-pilosa +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pilosa +# Python Client for Pilosa + +<a href="https://github.com/pilosa"><img src="https://img.shields.io/badge/pilosa-1.3-blue.svg"></a> +<a href="https://pypi.python.org/pypi/pilosa"><img src="https://img.shields.io/pypi/v/pilosa.svg?maxAge=2592&updated=2"></a> +<a href="http://pilosa.readthedocs.io/en/latest/?badge=latest"><img src="https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat"></A> +<a href="https://travis-ci.org/pilosa/python-pilosa"><img src="https://api.travis-ci.org/pilosa/python-pilosa.svg?branch=master"></a> +<a href="https://coveralls.io/github/pilosa/python-pilosa?branch=master"><img src="https://coveralls.io/repos/github/pilosa/python-pilosa/badge.svg?branch=master"></a> + +<img src="https://www.pilosa.com/img/ce.svg" style="float: right" align="right" height="301"> + +Python client for Pilosa high performance distributed row index. + +## What's New? + +See: [CHANGELOG](https://github.com/pilosa/python-pilosa/blob/master/CHANGELOG.md) + +## Requirements + +* **Compatible with Pilosa 1.2 and Pilosa 1.3** +* Requires Python 2.7 and higher or Python 3.4 and higher. + +## Install + +Pilosa client is on [PyPI](https://pypi.python.org/pypi/pilosa). You can install the library using `pip`: + +``` +pip install pilosa +``` + +## Usage + +### Quick overview + +Assuming [Pilosa](https://github.com/pilosa/pilosa) server is running at `localhost:10101` (the default): + +```python +import pilosa + +# Create the default client +client = pilosa.Client() + +# Retrieve the schema +schema = client.schema() + +# Create an Index object +myindex = schema.index("myindex") + +# Create a Field object +myfield = myindex.field("myfield") + +# make sure the index and field exists on the server +client.sync_schema(schema) + +# Send a Set query. PilosaError is thrown if execution of the query fails. +client.query(myfield.set(5, 42)) + +# Send a Row query. PilosaError is thrown if execution of the query fails. +response = client.query(myfield.row(5)) + +# Get the result +result = response.result + +# Act on the result +if result: + columns = result.row.columns + print("Got columns: ", columns) + +# You can batch queries to improve throughput +response = client.query( + myindex.batch_query( + myfield.row(5), + myfield.row(10), + ) +) +for result in response.results: + # Act on the result + print(result.row.columns) +``` + +## Documentation + +### Data Model and Queries + +See: [Data Model and Queries](https://github.com/pilosa/python-pilosa/blob/master/docs/data-model-queries.md) + +### Executing Queries + +See: [Server Interaction](https://github.com/pilosa/python-pilosa/blob/master/docs/server-interaction.md) + +### Importing and Exporting Data + +See: [Importing and Exporting Data](https://github.com/pilosa/python-pilosa/blob/master/docs/imports.md) + +### Other Documentation + +* [Tracing](docs/tracing.md) + +## Contributing + +See: [CONTRIBUTING](https://github.com/pilosa/python-pilosa/blob/master/CONTRIBUTING.md) + +## License + +See: [LICENSE](https://github.com/pilosa/python-pilosa/blob/master/LICENSE) + + + + +%package help +Summary: Development documents and examples for pilosa +Provides: python3-pilosa-doc +%description help +# Python Client for Pilosa + +<a href="https://github.com/pilosa"><img src="https://img.shields.io/badge/pilosa-1.3-blue.svg"></a> +<a href="https://pypi.python.org/pypi/pilosa"><img src="https://img.shields.io/pypi/v/pilosa.svg?maxAge=2592&updated=2"></a> +<a href="http://pilosa.readthedocs.io/en/latest/?badge=latest"><img src="https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat"></A> +<a href="https://travis-ci.org/pilosa/python-pilosa"><img src="https://api.travis-ci.org/pilosa/python-pilosa.svg?branch=master"></a> +<a href="https://coveralls.io/github/pilosa/python-pilosa?branch=master"><img src="https://coveralls.io/repos/github/pilosa/python-pilosa/badge.svg?branch=master"></a> + +<img src="https://www.pilosa.com/img/ce.svg" style="float: right" align="right" height="301"> + +Python client for Pilosa high performance distributed row index. + +## What's New? + +See: [CHANGELOG](https://github.com/pilosa/python-pilosa/blob/master/CHANGELOG.md) + +## Requirements + +* **Compatible with Pilosa 1.2 and Pilosa 1.3** +* Requires Python 2.7 and higher or Python 3.4 and higher. + +## Install + +Pilosa client is on [PyPI](https://pypi.python.org/pypi/pilosa). You can install the library using `pip`: + +``` +pip install pilosa +``` + +## Usage + +### Quick overview + +Assuming [Pilosa](https://github.com/pilosa/pilosa) server is running at `localhost:10101` (the default): + +```python +import pilosa + +# Create the default client +client = pilosa.Client() + +# Retrieve the schema +schema = client.schema() + +# Create an Index object +myindex = schema.index("myindex") + +# Create a Field object +myfield = myindex.field("myfield") + +# make sure the index and field exists on the server +client.sync_schema(schema) + +# Send a Set query. PilosaError is thrown if execution of the query fails. +client.query(myfield.set(5, 42)) + +# Send a Row query. PilosaError is thrown if execution of the query fails. +response = client.query(myfield.row(5)) + +# Get the result +result = response.result + +# Act on the result +if result: + columns = result.row.columns + print("Got columns: ", columns) + +# You can batch queries to improve throughput +response = client.query( + myindex.batch_query( + myfield.row(5), + myfield.row(10), + ) +) +for result in response.results: + # Act on the result + print(result.row.columns) +``` + +## Documentation + +### Data Model and Queries + +See: [Data Model and Queries](https://github.com/pilosa/python-pilosa/blob/master/docs/data-model-queries.md) + +### Executing Queries + +See: [Server Interaction](https://github.com/pilosa/python-pilosa/blob/master/docs/server-interaction.md) + +### Importing and Exporting Data + +See: [Importing and Exporting Data](https://github.com/pilosa/python-pilosa/blob/master/docs/imports.md) + +### Other Documentation + +* [Tracing](docs/tracing.md) + +## Contributing + +See: [CONTRIBUTING](https://github.com/pilosa/python-pilosa/blob/master/CONTRIBUTING.md) + +## License + +See: [LICENSE](https://github.com/pilosa/python-pilosa/blob/master/LICENSE) + + + + +%prep +%autosetup -n pilosa-1.3.1 + +%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-pilosa -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 17 2023 Python_Bot <Python_Bot@openeuler.org> - 1.3.1-1 +- Package Spec generated |
