# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['supabase', 'supabase.lib']

package_data = \
{'': ['*']}

install_requires = \
['gotrue>=1.0.1,<2.0.0',
 'httpx>=0.23.0,<0.24.0',
 'postgrest>=0.10.6,<0.11.0',
 'python-semantic-release==7.33.2',
 'realtime>=1.0.0,<2.0.0',
 'storage3>=0.5.2,<0.6.0',
 'supafunc>=0.2.2,<0.3.0']

entry_points = \
{'console_scripts': ['tests = poetry_scripts:run_tests']}

setup_kwargs = {
    'name': 'supabase',
    'version': '1.0.3',
    'description': 'Supabase client for Python.',
    'long_description': '# supabase-py\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?label=license)](https://opensource.org/licenses/MIT)\n[![CI](https://github.com/supabase-community/supabase-py/actions/workflows/ci.yml/badge.svg)](https://github.com/supabase-community/supabase-py/actions/workflows/ci.yml)\n[![Python](https://img.shields.io/pypi/pyversions/supabase)](https://pypi.org/project/supabase)\n[![Version](https://img.shields.io/pypi/v/supabase?color=%2334D058)](https://pypi.org/project/supabase)\n[![Codecov](https://codecov.io/gh/supabase-community/supabase-py/branch/develop/graph/badge.svg)](https://codecov.io/gh/supabase-community/supabase-py)\n[![Last commit](https://img.shields.io/github/last-commit/supabase-community/supabase-py.svg?style=flat)](https://github.com/supabase-community/supabase-py/commits)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/supabase-community/supabase-py)](https://github.com/supabase-community/supabase-py/commits)\n[![Github Stars](https://img.shields.io/github/stars/supabase-community/supabase-py?style=flat&logo=github)](https://github.com/supabase-community/supabase-py/stargazers)\n[![Github Forks](https://img.shields.io/github/forks/supabase-community/supabase-py?style=flat&logo=github)](https://github.com/supabase-community/supabase-py/network/members)\n[![Github Watchers](https://img.shields.io/github/watchers/supabase-community/supabase-py?style=flat&logo=github)](https://github.com/supabase-community/supabase-py)\n[![GitHub contributors](https://img.shields.io/github/contributors/supabase-community/supabase-py)](https://github.com/supabase-community/supabase-py/graphs/contributors)\n\nSupabase client for Python. This mirrors the design of [supabase-js](https://github.com/supabase/supabase-js/blob/master/README.md)\n\n| Status | Stability | Goal |\n| ------ | ------ | ---- |\n| ✅ | Alpha | We are testing Supabase with a closed set of customers |\n| ✅ | Public Alpha | Anyone can sign up over at [app.supabase.io](https://app.supabase.com). But go easy on us, there are a few kinks. |\n| 🚧 | Public Beta | Stable enough for most non-enterprise use-cases |\n| ❌ | Public | Production-ready |\n\nWe are currently in Public Alpha. Watch "releases" of this repo to get notified of major updates.\n\n\n## Installation\n\n**Recomended:** First activate your virtual environment, with your favourite system. For example, we like `poetry` and `conda`!\n\n### PyPi installation\n\nNow install the package. (for > Python 3.7)\n\n```bash\n# with pip\npip install supabase\n\n# with conda\nconda install -c conda-forge supabase\n```\n\n### Local installation\n\nYou can also install locally after cloning this repo. Install Development mode with ``pip install -e``, which makes it so when you edit the source code the changes will be reflected in your python module.\n\n## Usage\n\nIt\'s usually best practice to set your api key environment variables in some way that version control doesn\'t track them, e.g don\'t put them in your python modules! Set the key and url for the supabase instance in the shell, or better yet, use a dotenv file. Heres how to set the variables in the shell.\n\n```bash\nexport SUPABASE_URL="my-url-to-my-awesome-supabase-instance"\nexport SUPABASE_KEY="my-supa-dupa-secret-supabase-api-key"\n```\n\nWe can then read the keys in the python source code.\n\n```python\nimport os\nfrom supabase import create_client, Client\n\nurl: str = os.environ.get("SUPABASE_URL")\nkey: str = os.environ.get("SUPABASE_KEY")\nsupabase: Client = create_client(url, key)\n```\n\nUse the supabase client to interface with your database.\n\n### Running Tests\n\nCurrently the test suites are in a state of flux. We are expanding our clients tests to ensure things are working, and for now can connect to this test instance, that is populated with the following table:\n\n<p align="center">\n  <img width="720" height="481" src="https://i.ibb.co/Bq7Kdty/db.png">\n</p>\n\nThe above test database is a blank supabase instance that has populated the `countries` table with the built in countries script that can be found in the supabase UI. You can launch the test scripts and point to the above test database by running\n\n```bash\n./test.sh\n```\n\n### See issues for what to work on\n\nRough roadmap:\n\n- [x] Wrap [Postgrest-py](https://github.com/supabase-community/postgrest-py/)\n- [ ] Wrap [Realtime-py](https://github.com/supabase-community/realtime-py)\n- [x] Wrap [Gotrue-py](https://github.com/supabase-community/gotrue-py)\n- [x] Wrap [storage-py](https://github.com/supabase-community/storage-py)\n- [x] Wrap [functions-py](https://github.com/supabase-community/functions-py)\n\n### Client Library\n\n## Authenticate\n\n```python\nfrom supabase import create_client, Client\n\nurl: str = os.environ.get("SUPABASE_TEST_URL")\nkey: str = os.environ.get("SUPABASE_TEST_KEY")\nsupabase: Client = create_client(url, key)\n# Create a random user login email and password.\nrandom_email: str = "3hf82fijf92@supamail.com"\nrandom_password: str = "fqj13bnf2hiu23h"\nuser = supabase.auth.sign_up(email=random_email, password=random_password)\n```\n\n## Sign-in\n\n```python\nfrom supabase import create_client, Client\n\nurl: str = os.environ.get("SUPABASE_TEST_URL")\nkey: str = os.environ.get("SUPABASE_TEST_KEY")\nsupabase: Client = create_client(url, key)\n# Sign in using the user email and password.\nrandom_email: str = "3hf82fijf92@supamail.com"\nrandom_password: str = "fqj13bnf2hiu23h"\nuser = supabase.auth.sign_in(email=random_email, password=random_password)\n```\n\n## Managing Data\n\n### Insertion of Data\n\n```python\nfrom supabase import create_client, Client\n\nurl: str = os.environ.get("SUPABASE_TEST_URL")\nkey: str = os.environ.get("SUPABASE_TEST_KEY")\nsupabase: Client = create_client(url, key)\ndata = supabase.table("countries").insert({"name":"Germany"}).execute()\nassert len(data.data) > 0\n```\n\n### Selection of Data\n\n```python\nfrom supabase import create_client, Client\n\nurl: str = os.environ.get("SUPABASE_TEST_URL")\nkey: str = os.environ.get("SUPABASE_TEST_KEY")\nsupabase: Client = create_client(url, key)\ndata = supabase.table("countries").select("*").eq("country", "IL").execute()\n# Assert we pulled real data.\nassert len(data.data) > 0\n```\n\n### Update of Data\n\n```python\nfrom supabase import create_client, Client\n\nurl: str = os.environ.get("SUPABASE_TEST_URL")\nkey: str = os.environ.get("SUPABASE_TEST_KEY")\nsupabase: Client = create_client(url, key)\ndata = supabase.table("countries").update({"country": "Indonesia", "capital_city": "Jakarta"}).eq("id", 1).execute()\n```\n\n### Deletion of Data\n\n```python\nfrom supabase import create_client, Client\n\nurl: str = os.environ.get("SUPABASE_TEST_URL")\nkey: str = os.environ.get("SUPABASE_TEST_KEY")\nsupabase: Client = create_client(url, key)\ndata = supabase.table("countries").delete().eq("id", 1).execute()\n```\n\n### Supabase Functions\n\n```python\nfrom supabase import create_client, Client\n\nurl: str = os.environ.get("SUPABASE_TEST_URL")\nkey: str = os.environ.get("SUPABASE_TEST_KEY")\nsupabase: Client = create_client(url, key)\nfunc = supabase.functions()\n\n@asyncio.coroutine\nasync def test_func(loop):\n    resp = await func.invoke("hello-world",invoke_options={\'body\':{}})\n    return resp\n\nloop = asyncio.get_event_loop()\nresp = loop.run_until_complete(test_func(loop))\nloop.close()\n```\n\n## Realtime Changes\n\nRealtime changes are unfortunately still a WIP. Feel free to file PRs to [realtime-py](https://github.com/supabase-community/realtime-py)\n\nSee [Supabase Docs](https://supabase.com/docs/guides/client-libraries) for full list of examples\n\n## Python and Supabase Resources\n\n- [Python data loading with Supabase](https://supabase.com/blog/loading-data-supabase-python)\n- [Visualizing Supabase Data using Metabase](https://supabase.com/blog/visualizing-supabase-data-using-metabase)\n',
    'author': 'Joel Lee',
    'author_email': 'joel@joellee.org',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'https://github.com/supabase-community/supabase-py',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.8,<4.0',
}


setup(**setup_kwargs)
