%global _empty_manifest_terminate_build 0 Name: python-hdfs Version: 2.7.0 Release: 1 Summary: HdfsCLI: API and command line interface for HDFS. License: MIT URL: https://hdfscli.readthedocs.io Source0: https://mirrors.nju.edu.cn/pypi/web/packages/3d/66/d68af85d8b606dabd5cdc1b274599080ed9fa31fcade59347b1eecaeb5e7/hdfs-2.7.0.tar.gz BuildArch: noarch Requires: python3-docopt Requires: python3-requests Requires: python3-six Requires: python3-fastavro Requires: python3-fastavro Requires: python3-pandas Requires: python3-requests-kerberos %description # HdfsCLI [![CI](https://github.com/mtth/hdfs/actions/workflows/ci.yml/badge.svg)](https://github.com/mtth/hdfs/actions/workflows/ci.yml) [![Pypi badge](https://badge.fury.io/py/hdfs.svg)](https://pypi.python.org/pypi/hdfs/) [![Downloads badge](https://img.shields.io/pypi/dm/hdfs.svg)](https://pypistats.org/packages/hdfs) API and command line interface for HDFS. ``` $ hdfscli --alias=dev Welcome to the interactive HDFS python shell. The HDFS client is available as `CLIENT`. In [1]: CLIENT.list('models/') Out[1]: ['1.json', '2.json'] In [2]: CLIENT.status('models/2.json') Out[2]: { 'accessTime': 1439743128690, 'blockSize': 134217728, 'childrenNum': 0, 'fileId': 16389, 'group': 'supergroup', 'length': 48, 'modificationTime': 1439743129392, 'owner': 'drwho', 'pathSuffix': '', 'permission': '755', 'replication': 1, 'storagePolicy': 0, 'type': 'FILE' } In [3]: with CLIENT.read('models/2.json', encoding='utf-8') as reader: ...: from json import load ...: model = load(reader) ...: ``` ## Features * Python (2 and 3) bindings for the [WebHDFS][] (and [HttpFS][]) API, supporting both secure and insecure clusters. * Command line interface to transfer files and start an interactive client shell, with aliases for convenient namenode URL caching. * Additional functionality through optional extensions: + `avro`, to [read and write Avro files directly from HDFS][]. + `dataframe`, to [load and save Pandas dataframes][]. + `kerberos`, to [support Kerberos authenticated clusters][]. See the [documentation][] to learn more. ## Getting started ```sh $ pip install hdfs ``` Then hop on over to the [quickstart][] guide. A [Conda feedstock](https://github.com/conda-forge/python-hdfs-feedstock) is also available. ## Testing HdfsCLI is tested against both [WebHDFS][] and [HttpFS][]. There are two ways of running tests (see `scripts/` for helpers to set up a test HDFS cluster): ```sh $ HDFSCLI_TEST_URL=http://localhost:50070 nosetests # Using a namenode's URL. $ HDFSCLI_TEST_ALIAS=dev nosetests # Using an alias. ``` ## Contributing We'd love to hear what you think on the [issues][] page. Pull requests are also most welcome! [HttpFS]: http://hadoop.apache.org/docs/current/hadoop-hdfs-httpfs/ [WebHDFS]: http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html [read and write Avro files directly from HDFS]: https://hdfscli.readthedocs.io/en/latest/api.html#module-hdfs.ext.avro [load and save Pandas dataframes]: https://hdfscli.readthedocs.io/en/latest/api.html#module-hdfs.ext.dataframe [support Kerberos authenticated clusters]: https://hdfscli.readthedocs.io/en/latest/api.html#module-hdfs.ext.kerberos [documentation]: https://hdfscli.readthedocs.io/ [quickstart]: https://hdfscli.readthedocs.io/en/latest/quickstart.html [issues]: https://github.com/mtth/hdfs/issues %package -n python3-hdfs Summary: HdfsCLI: API and command line interface for HDFS. Provides: python-hdfs BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-hdfs # HdfsCLI [![CI](https://github.com/mtth/hdfs/actions/workflows/ci.yml/badge.svg)](https://github.com/mtth/hdfs/actions/workflows/ci.yml) [![Pypi badge](https://badge.fury.io/py/hdfs.svg)](https://pypi.python.org/pypi/hdfs/) [![Downloads badge](https://img.shields.io/pypi/dm/hdfs.svg)](https://pypistats.org/packages/hdfs) API and command line interface for HDFS. ``` $ hdfscli --alias=dev Welcome to the interactive HDFS python shell. The HDFS client is available as `CLIENT`. In [1]: CLIENT.list('models/') Out[1]: ['1.json', '2.json'] In [2]: CLIENT.status('models/2.json') Out[2]: { 'accessTime': 1439743128690, 'blockSize': 134217728, 'childrenNum': 0, 'fileId': 16389, 'group': 'supergroup', 'length': 48, 'modificationTime': 1439743129392, 'owner': 'drwho', 'pathSuffix': '', 'permission': '755', 'replication': 1, 'storagePolicy': 0, 'type': 'FILE' } In [3]: with CLIENT.read('models/2.json', encoding='utf-8') as reader: ...: from json import load ...: model = load(reader) ...: ``` ## Features * Python (2 and 3) bindings for the [WebHDFS][] (and [HttpFS][]) API, supporting both secure and insecure clusters. * Command line interface to transfer files and start an interactive client shell, with aliases for convenient namenode URL caching. * Additional functionality through optional extensions: + `avro`, to [read and write Avro files directly from HDFS][]. + `dataframe`, to [load and save Pandas dataframes][]. + `kerberos`, to [support Kerberos authenticated clusters][]. See the [documentation][] to learn more. ## Getting started ```sh $ pip install hdfs ``` Then hop on over to the [quickstart][] guide. A [Conda feedstock](https://github.com/conda-forge/python-hdfs-feedstock) is also available. ## Testing HdfsCLI is tested against both [WebHDFS][] and [HttpFS][]. There are two ways of running tests (see `scripts/` for helpers to set up a test HDFS cluster): ```sh $ HDFSCLI_TEST_URL=http://localhost:50070 nosetests # Using a namenode's URL. $ HDFSCLI_TEST_ALIAS=dev nosetests # Using an alias. ``` ## Contributing We'd love to hear what you think on the [issues][] page. Pull requests are also most welcome! [HttpFS]: http://hadoop.apache.org/docs/current/hadoop-hdfs-httpfs/ [WebHDFS]: http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html [read and write Avro files directly from HDFS]: https://hdfscli.readthedocs.io/en/latest/api.html#module-hdfs.ext.avro [load and save Pandas dataframes]: https://hdfscli.readthedocs.io/en/latest/api.html#module-hdfs.ext.dataframe [support Kerberos authenticated clusters]: https://hdfscli.readthedocs.io/en/latest/api.html#module-hdfs.ext.kerberos [documentation]: https://hdfscli.readthedocs.io/ [quickstart]: https://hdfscli.readthedocs.io/en/latest/quickstart.html [issues]: https://github.com/mtth/hdfs/issues %package help Summary: Development documents and examples for hdfs Provides: python3-hdfs-doc %description help # HdfsCLI [![CI](https://github.com/mtth/hdfs/actions/workflows/ci.yml/badge.svg)](https://github.com/mtth/hdfs/actions/workflows/ci.yml) [![Pypi badge](https://badge.fury.io/py/hdfs.svg)](https://pypi.python.org/pypi/hdfs/) [![Downloads badge](https://img.shields.io/pypi/dm/hdfs.svg)](https://pypistats.org/packages/hdfs) API and command line interface for HDFS. ``` $ hdfscli --alias=dev Welcome to the interactive HDFS python shell. The HDFS client is available as `CLIENT`. In [1]: CLIENT.list('models/') Out[1]: ['1.json', '2.json'] In [2]: CLIENT.status('models/2.json') Out[2]: { 'accessTime': 1439743128690, 'blockSize': 134217728, 'childrenNum': 0, 'fileId': 16389, 'group': 'supergroup', 'length': 48, 'modificationTime': 1439743129392, 'owner': 'drwho', 'pathSuffix': '', 'permission': '755', 'replication': 1, 'storagePolicy': 0, 'type': 'FILE' } In [3]: with CLIENT.read('models/2.json', encoding='utf-8') as reader: ...: from json import load ...: model = load(reader) ...: ``` ## Features * Python (2 and 3) bindings for the [WebHDFS][] (and [HttpFS][]) API, supporting both secure and insecure clusters. * Command line interface to transfer files and start an interactive client shell, with aliases for convenient namenode URL caching. * Additional functionality through optional extensions: + `avro`, to [read and write Avro files directly from HDFS][]. + `dataframe`, to [load and save Pandas dataframes][]. + `kerberos`, to [support Kerberos authenticated clusters][]. See the [documentation][] to learn more. ## Getting started ```sh $ pip install hdfs ``` Then hop on over to the [quickstart][] guide. A [Conda feedstock](https://github.com/conda-forge/python-hdfs-feedstock) is also available. ## Testing HdfsCLI is tested against both [WebHDFS][] and [HttpFS][]. There are two ways of running tests (see `scripts/` for helpers to set up a test HDFS cluster): ```sh $ HDFSCLI_TEST_URL=http://localhost:50070 nosetests # Using a namenode's URL. $ HDFSCLI_TEST_ALIAS=dev nosetests # Using an alias. ``` ## Contributing We'd love to hear what you think on the [issues][] page. Pull requests are also most welcome! [HttpFS]: http://hadoop.apache.org/docs/current/hadoop-hdfs-httpfs/ [WebHDFS]: http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/WebHDFS.html [read and write Avro files directly from HDFS]: https://hdfscli.readthedocs.io/en/latest/api.html#module-hdfs.ext.avro [load and save Pandas dataframes]: https://hdfscli.readthedocs.io/en/latest/api.html#module-hdfs.ext.dataframe [support Kerberos authenticated clusters]: https://hdfscli.readthedocs.io/en/latest/api.html#module-hdfs.ext.kerberos [documentation]: https://hdfscli.readthedocs.io/ [quickstart]: https://hdfscli.readthedocs.io/en/latest/quickstart.html [issues]: https://github.com/mtth/hdfs/issues %prep %autosetup -n hdfs-2.7.0 %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-hdfs -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Apr 21 2023 Python_Bot - 2.7.0-1 - Package Spec generated