diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-18 06:45:42 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-18 06:45:42 +0000 |
commit | c4ed1051c54044b46a9c3f89b59901998e72a76c (patch) | |
tree | 49a14d9725ffb0193f5fbd85b458e41a42ad8b6a | |
parent | 6d10033e79ade47ed9a7cc65900d9f166e171d49 (diff) |
automatic import of python-postgrest-py
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-postgrest-py.spec | 445 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 447 insertions, 0 deletions
@@ -0,0 +1 @@ +/postgrest_py-0.10.6.tar.gz diff --git a/python-postgrest-py.spec b/python-postgrest-py.spec new file mode 100644 index 0000000..97c7d5c --- /dev/null +++ b/python-postgrest-py.spec @@ -0,0 +1,445 @@ +%global _empty_manifest_terminate_build 0 +Name: python-postgrest-py +Version: 0.10.6 +Release: 1 +Summary: PostgREST client for Python. This library provides an ORM interface to PostgREST. +License: MIT +URL: https://github.com/supabase-community/postgrest-py +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/67/55/dbed1b827241e1ab87811568d9c8099f7b421743b828297945c2cfc2ca91/postgrest_py-0.10.6.tar.gz +BuildArch: noarch + +Requires: python3-httpx +Requires: python3-deprecation +Requires: python3-pydantic +Requires: python3-strenum + +%description +# postgrest-py + +[](https://opensource.org/licenses/MIT) +[](https://github.com/supabase-community/postgrest-py/actions/workflows/ci.yml) +[](https://pypi.org/project/postgrest-py) +[](https://pypi.org/project/postgrest-py) +[](https://codecov.io/gh/supabase-community/postgrest-py) +[](https://github.com/supabase-community/postgrest-py/commits) +[](https://github.com/supabase-community/postgrest-py/commits) +[](https://github.com/supabase-community/postgrest-py/stargazers) +[](https://github.com/supabase-community/postgrest-py/network/members) +[](https://github.com/supabase-community/postgrest-py) +[](https://github.com/supabase-community/postgrest-py/graphs/contributors) + +PostgREST client for Python. This library provides an ORM interface to PostgREST. + +Status: **Unstable** + +## INSTALLATION + +### Requirements + +- Python >= 3.7 +- PostgreSQL >= 12 +- PostgREST >= 7 + +### Local PostgREST server + +If you want to use a local PostgREST server for development, you can use our preconfigured instance via Docker Compose. + +```sh +docker-compose up +``` + +Once Docker Compose started, PostgREST is accessible at <http://localhost:3000>. + +### Instructions + +#### With Poetry (recommended) + +```sh +poetry add postgrest +``` + +#### With Pip + +```sh +pip install postgrest +``` + +## USAGE + +### Getting started + +```py +import asyncio +from postgrest import AsyncPostgrestClient + +async def main(): + async with AsyncPostgrestClient("http://localhost:3000") as client: + r = await client.from_("countries").select("*").execute() + countries = r.data + +asyncio.run(main()) +``` + +### Create + +```py +await client.from_("countries").insert({ "name": "Việt Nam", "capital": "Hà Nội" }).execute() +``` + +### Read + +```py +r = await client.from_("countries").select("id", "name").execute() +countries = r.data +``` + +### Update + +```py +await client.from_("countries").update({"capital": "Hà Nội"}).eq("name", "Việt Nam").execute() +``` + +### Delete + +```py +await client.from_("countries").delete().eq("name", "Việt Nam").execute() +``` + +### General filters + +### Stored procedures (RPC) +```py +await client.rpc("foobar", {"arg1": "value1", "arg2": "value2"}).execute() +``` + +## DEVELOPMENT + +```sh +git clone https://github.com/supabase/postgrest-py.git +cd postgrest-py +poetry install +poetry run pre-commit install +``` + +### Testing + +```sh +poetry run pytest +``` + +## CHANGELOG + +Read more [here](https://github.com/supabase/postgrest-py/blob/master/CHANGELOG.md). + +## SPONSORS + +We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone. + +[](https://www.worklife.vc) +[](https://github.com/sponsors/supabase) + + +%package -n python3-postgrest-py +Summary: PostgREST client for Python. This library provides an ORM interface to PostgREST. +Provides: python-postgrest-py +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-postgrest-py +# postgrest-py + +[](https://opensource.org/licenses/MIT) +[](https://github.com/supabase-community/postgrest-py/actions/workflows/ci.yml) +[](https://pypi.org/project/postgrest-py) +[](https://pypi.org/project/postgrest-py) +[](https://codecov.io/gh/supabase-community/postgrest-py) +[](https://github.com/supabase-community/postgrest-py/commits) +[](https://github.com/supabase-community/postgrest-py/commits) +[](https://github.com/supabase-community/postgrest-py/stargazers) +[](https://github.com/supabase-community/postgrest-py/network/members) +[](https://github.com/supabase-community/postgrest-py) +[](https://github.com/supabase-community/postgrest-py/graphs/contributors) + +PostgREST client for Python. This library provides an ORM interface to PostgREST. + +Status: **Unstable** + +## INSTALLATION + +### Requirements + +- Python >= 3.7 +- PostgreSQL >= 12 +- PostgREST >= 7 + +### Local PostgREST server + +If you want to use a local PostgREST server for development, you can use our preconfigured instance via Docker Compose. + +```sh +docker-compose up +``` + +Once Docker Compose started, PostgREST is accessible at <http://localhost:3000>. + +### Instructions + +#### With Poetry (recommended) + +```sh +poetry add postgrest +``` + +#### With Pip + +```sh +pip install postgrest +``` + +## USAGE + +### Getting started + +```py +import asyncio +from postgrest import AsyncPostgrestClient + +async def main(): + async with AsyncPostgrestClient("http://localhost:3000") as client: + r = await client.from_("countries").select("*").execute() + countries = r.data + +asyncio.run(main()) +``` + +### Create + +```py +await client.from_("countries").insert({ "name": "Việt Nam", "capital": "Hà Nội" }).execute() +``` + +### Read + +```py +r = await client.from_("countries").select("id", "name").execute() +countries = r.data +``` + +### Update + +```py +await client.from_("countries").update({"capital": "Hà Nội"}).eq("name", "Việt Nam").execute() +``` + +### Delete + +```py +await client.from_("countries").delete().eq("name", "Việt Nam").execute() +``` + +### General filters + +### Stored procedures (RPC) +```py +await client.rpc("foobar", {"arg1": "value1", "arg2": "value2"}).execute() +``` + +## DEVELOPMENT + +```sh +git clone https://github.com/supabase/postgrest-py.git +cd postgrest-py +poetry install +poetry run pre-commit install +``` + +### Testing + +```sh +poetry run pytest +``` + +## CHANGELOG + +Read more [here](https://github.com/supabase/postgrest-py/blob/master/CHANGELOG.md). + +## SPONSORS + +We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone. + +[](https://www.worklife.vc) +[](https://github.com/sponsors/supabase) + + +%package help +Summary: Development documents and examples for postgrest-py +Provides: python3-postgrest-py-doc +%description help +# postgrest-py + +[](https://opensource.org/licenses/MIT) +[](https://github.com/supabase-community/postgrest-py/actions/workflows/ci.yml) +[](https://pypi.org/project/postgrest-py) +[](https://pypi.org/project/postgrest-py) +[](https://codecov.io/gh/supabase-community/postgrest-py) +[](https://github.com/supabase-community/postgrest-py/commits) +[](https://github.com/supabase-community/postgrest-py/commits) +[](https://github.com/supabase-community/postgrest-py/stargazers) +[](https://github.com/supabase-community/postgrest-py/network/members) +[](https://github.com/supabase-community/postgrest-py) +[](https://github.com/supabase-community/postgrest-py/graphs/contributors) + +PostgREST client for Python. This library provides an ORM interface to PostgREST. + +Status: **Unstable** + +## INSTALLATION + +### Requirements + +- Python >= 3.7 +- PostgreSQL >= 12 +- PostgREST >= 7 + +### Local PostgREST server + +If you want to use a local PostgREST server for development, you can use our preconfigured instance via Docker Compose. + +```sh +docker-compose up +``` + +Once Docker Compose started, PostgREST is accessible at <http://localhost:3000>. + +### Instructions + +#### With Poetry (recommended) + +```sh +poetry add postgrest +``` + +#### With Pip + +```sh +pip install postgrest +``` + +## USAGE + +### Getting started + +```py +import asyncio +from postgrest import AsyncPostgrestClient + +async def main(): + async with AsyncPostgrestClient("http://localhost:3000") as client: + r = await client.from_("countries").select("*").execute() + countries = r.data + +asyncio.run(main()) +``` + +### Create + +```py +await client.from_("countries").insert({ "name": "Việt Nam", "capital": "Hà Nội" }).execute() +``` + +### Read + +```py +r = await client.from_("countries").select("id", "name").execute() +countries = r.data +``` + +### Update + +```py +await client.from_("countries").update({"capital": "Hà Nội"}).eq("name", "Việt Nam").execute() +``` + +### Delete + +```py +await client.from_("countries").delete().eq("name", "Việt Nam").execute() +``` + +### General filters + +### Stored procedures (RPC) +```py +await client.rpc("foobar", {"arg1": "value1", "arg2": "value2"}).execute() +``` + +## DEVELOPMENT + +```sh +git clone https://github.com/supabase/postgrest-py.git +cd postgrest-py +poetry install +poetry run pre-commit install +``` + +### Testing + +```sh +poetry run pytest +``` + +## CHANGELOG + +Read more [here](https://github.com/supabase/postgrest-py/blob/master/CHANGELOG.md). + +## SPONSORS + +We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone. + +[](https://www.worklife.vc) +[](https://github.com/sponsors/supabase) + + +%prep +%autosetup -n postgrest-py-0.10.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-postgrest-py -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.10.6-1 +- Package Spec generated @@ -0,0 +1 @@ +ddbeae4ed6505bc00c01d74bd716153a postgrest_py-0.10.6.tar.gz |