From 031b4912af476b5e56d4cd053b4a2c3734da1112 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 5 May 2023 07:07:56 +0000 Subject: automatic import of python-json-enhanced --- .gitignore | 1 + python-json-enhanced.spec | 322 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 324 insertions(+) create mode 100644 python-json-enhanced.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..f6119c7 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/json-enhanced-0.2.6.tar.gz diff --git a/python-json-enhanced.spec b/python-json-enhanced.spec new file mode 100644 index 0000000..4db8d53 --- /dev/null +++ b/python-json-enhanced.spec @@ -0,0 +1,322 @@ +%global _empty_manifest_terminate_build 0 +Name: python-json-enhanced +Version: 0.2.6 +Release: 1 +Summary: Translates Django ORM query system to json objects +License: GNU General Public License v3 (GPLv3) +URL: https://github.com/Collisio/json-enhanced +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/42/96/1db01be3f6874102a6827506192d66c6a34bed49f0512db1de623254915d/json-enhanced-0.2.6.tar.gz +BuildArch: noarch + +Requires: python3-requests +Requires: python3-pytz +Requires: python3-beautifulsoup4 +Requires: python3-lxml + +%description + +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/json-enhanced) +![PyPI](https://img.shields.io/pypi/v/json-enhanced) +# JSON Enhanced + +JSON Enhanced implements fast and pythonic queries and mutations for JSON objects. + +# Installation + +You can install json-enhanced with pip: + +``` +pip install json-enhanced +``` +# Quickstart +```python +import jsonutils as js +from datetime import datetime + +# We create a new JSONObject either directly or from a local file/URL: +json_data = js.JSONObject( + { + "data": [ + { + "name": "Dan", + "birthday": "1991-01-02 09:00:00", + "publications": 15 + }, + { + "name": "Mar", + "birthday": "1991-03-02 12:30:00", + "publications": 13 + }, + { + "name": "Carl", + "birthday": "1950-06-02 16:00:00", + "publications": 36 + }, + { + "name": "Vic", + "birthday": "1986-07-02 16:00:00", + "publications": None + }, + ] + } +) + +# Now we can navegate through this object by attribute accesion: +json_data.data._1.name +# 'Mar' + +# Or we can make queries. The syntax is very similar to Django's querysets: +result = json_data.query(birthday__lt=datetime(1985,1,1)) + +result +# + +result.first().parent +# {'name': 'Carl', 'birthday': '1950-06-02 16:00:00', 'publications': 36} + +# We can also retrieve the path of a node: +result.first().jsonpath +# data/2/ +``` + +# Documentation + +Detailed documentation is available at [json-enhanced.readthedocs.io](https://json-enhanced.readthedocs.io/en/latest). + +# Contributing + +Contributions are welcome! Please take a look at our contributors guide. + +# Code of Conduct + +Please read [CODE_OF_CONDUCT.md](https://github.com/Collisio/json-enhanced/CODE_OF_CONDUCT.md) for details on our code of conduct. + +# License + +This project is licensed under the *GPL-3.0 License*. For details, please read our [LICENSE FILE](https://github.com/Collisio/json-enhanced/LICENSE). + + + + +%package -n python3-json-enhanced +Summary: Translates Django ORM query system to json objects +Provides: python-json-enhanced +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-json-enhanced + +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/json-enhanced) +![PyPI](https://img.shields.io/pypi/v/json-enhanced) +# JSON Enhanced + +JSON Enhanced implements fast and pythonic queries and mutations for JSON objects. + +# Installation + +You can install json-enhanced with pip: + +``` +pip install json-enhanced +``` +# Quickstart +```python +import jsonutils as js +from datetime import datetime + +# We create a new JSONObject either directly or from a local file/URL: +json_data = js.JSONObject( + { + "data": [ + { + "name": "Dan", + "birthday": "1991-01-02 09:00:00", + "publications": 15 + }, + { + "name": "Mar", + "birthday": "1991-03-02 12:30:00", + "publications": 13 + }, + { + "name": "Carl", + "birthday": "1950-06-02 16:00:00", + "publications": 36 + }, + { + "name": "Vic", + "birthday": "1986-07-02 16:00:00", + "publications": None + }, + ] + } +) + +# Now we can navegate through this object by attribute accesion: +json_data.data._1.name +# 'Mar' + +# Or we can make queries. The syntax is very similar to Django's querysets: +result = json_data.query(birthday__lt=datetime(1985,1,1)) + +result +# + +result.first().parent +# {'name': 'Carl', 'birthday': '1950-06-02 16:00:00', 'publications': 36} + +# We can also retrieve the path of a node: +result.first().jsonpath +# data/2/ +``` + +# Documentation + +Detailed documentation is available at [json-enhanced.readthedocs.io](https://json-enhanced.readthedocs.io/en/latest). + +# Contributing + +Contributions are welcome! Please take a look at our contributors guide. + +# Code of Conduct + +Please read [CODE_OF_CONDUCT.md](https://github.com/Collisio/json-enhanced/CODE_OF_CONDUCT.md) for details on our code of conduct. + +# License + +This project is licensed under the *GPL-3.0 License*. For details, please read our [LICENSE FILE](https://github.com/Collisio/json-enhanced/LICENSE). + + + + +%package help +Summary: Development documents and examples for json-enhanced +Provides: python3-json-enhanced-doc +%description help + +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/json-enhanced) +![PyPI](https://img.shields.io/pypi/v/json-enhanced) +# JSON Enhanced + +JSON Enhanced implements fast and pythonic queries and mutations for JSON objects. + +# Installation + +You can install json-enhanced with pip: + +``` +pip install json-enhanced +``` +# Quickstart +```python +import jsonutils as js +from datetime import datetime + +# We create a new JSONObject either directly or from a local file/URL: +json_data = js.JSONObject( + { + "data": [ + { + "name": "Dan", + "birthday": "1991-01-02 09:00:00", + "publications": 15 + }, + { + "name": "Mar", + "birthday": "1991-03-02 12:30:00", + "publications": 13 + }, + { + "name": "Carl", + "birthday": "1950-06-02 16:00:00", + "publications": 36 + }, + { + "name": "Vic", + "birthday": "1986-07-02 16:00:00", + "publications": None + }, + ] + } +) + +# Now we can navegate through this object by attribute accesion: +json_data.data._1.name +# 'Mar' + +# Or we can make queries. The syntax is very similar to Django's querysets: +result = json_data.query(birthday__lt=datetime(1985,1,1)) + +result +# + +result.first().parent +# {'name': 'Carl', 'birthday': '1950-06-02 16:00:00', 'publications': 36} + +# We can also retrieve the path of a node: +result.first().jsonpath +# data/2/ +``` + +# Documentation + +Detailed documentation is available at [json-enhanced.readthedocs.io](https://json-enhanced.readthedocs.io/en/latest). + +# Contributing + +Contributions are welcome! Please take a look at our contributors guide. + +# Code of Conduct + +Please read [CODE_OF_CONDUCT.md](https://github.com/Collisio/json-enhanced/CODE_OF_CONDUCT.md) for details on our code of conduct. + +# License + +This project is licensed under the *GPL-3.0 License*. For details, please read our [LICENSE FILE](https://github.com/Collisio/json-enhanced/LICENSE). + + + + +%prep +%autosetup -n json-enhanced-0.2.6 + +%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-json-enhanced -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot - 0.2.6-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..3110c23 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +00d185cc2e2ed0e51457253d54b4dee3 json-enhanced-0.2.6.tar.gz -- cgit v1.2.3