Skip to content

Commit

Permalink
Markdown lint fixes.
Browse files Browse the repository at this point in the history
Changes generated by: mdformat-gfm
  • Loading branch information
tinvaan committed Feb 19, 2024
1 parent 2bd19f3 commit c38a2bf
Show file tree
Hide file tree
Showing 8 changed files with 1,844 additions and 1,551 deletions.
28 changes: 16 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
---
______________________________________________________________________

name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---
______________________________________________________________________

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
1. Click on '....'
1. Scroll down to '....'
1. See error

**Expected behavior**
A clear and concise description of what you expected to happen.
Expand All @@ -24,15 +26,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: \[e.g. iOS\]
- Browser \[e.g. chrome, safari\]
- Version \[e.g. 22\]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: \[e.g. iPhone6\]
- OS: \[e.g. iOS8.1\]
- Browser \[e.g. stock browser, safari\]
- Version \[e.g. 22\]

**Additional context**
Add any other context about the problem here.
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
______________________________________________________________________

name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---
______________________________________________________________________

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
A clear and concise description of what the problem is. Ex. I'm always frustrated when \[...\]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Expand Down
3,255 changes: 1,767 additions & 1,488 deletions CHANGELOG.md

Large diffs are not rendered by default.

31 changes: 15 additions & 16 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributor Covenant Code of Conduct

## Our Pledge
Expand All @@ -15,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand All @@ -56,7 +55,7 @@ a project may be further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
reported by contacting the project team at \[INSERT EMAIL ADDRESS\]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand All @@ -69,9 +68,9 @@ members of the project's leadership.
## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
<https://www.contributor-covenant.org/faq>

[homepage]: https://www.contributor-covenant.org
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. After filing a pull request, please tag any two of the [current maintainers](./MAINTAINERS.md) to request a review.

## Report an issue/File a feature request

Before opening a new issue or request, please take a moment to check the existing issues and discussions to see if your topic has already been addressed. This helps us avoid duplicate issues and keeps the conversation focused.

Report all issues and file all feature requests through [GitHub Issues](./issues).
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MIT License
# MIT License

Copyright (c) 2020 Joel Lee

Expand Down
8 changes: 6 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Maintainers

This page lists all active maintainers of this repository. If you were a maintainer and would like to add your name to the Emeritus list, please send us a PR.

See CONTRIBUTING.md for general contribution guidelines.

# Maintainers (in alphabetical order)
## Maintainers (in alphabetical order)

- [olirice](https://github.com/olirice)
- [silentworks](https://github.com/silentworks)

# Emeritus Maintainers (in alphabetical order)
## Emeritus Maintainers (in alphabetical order)

- [anand2312](https://github.com/anand2312)
- [dreinon](https://github.com/dreinon)
- [fedden](https://github.com/fedden)
Expand Down
63 changes: 34 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ Python client for [Supabase](https://supabase.com)
- [Python data loading with Supabase](https://supabase.com/blog/loading-data-supabase-python)

## Set up a Local Development Environment
### Clone the Repository:

### Clone the Repository

```bash
git clone https://github.com/supabase-community/supabase-py.git
cd supabase-py
```

### Create and Activate a Virtual Environment:
### Create and Activate a Virtual Environment

We recommend activating your virtual environment. For example, we like `poetry` and `conda`! Click <a href="https://docs.python.org/3/library/venv.html">here</a> for more about Python virtual environments and working with <a href="https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment">conda</a> and <a href="https://python-poetry.org/docs/basic-usage/">poetry</a>.
We recommend activating your virtual environment. For example, we like `poetry` and `conda`! Click [here](https://docs.python.org/3/library/venv.html) for more about Python virtual environments and working with [conda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment) and [poetry](https://python-poetry.org/docs/basic-usage/).

Using venv (Python 3 built-in):

```bash
python3 -m venv env
source env/bin/activate # On Windows, use .\env\Scripts\activate
```

Using conda:

```bash
conda create --name supabase-py
conda activate supabase-py
Expand All @@ -44,7 +48,7 @@ conda install -c conda-forge supabase

### Local installation

You 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.
You 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.

## Usage

Expand All @@ -68,19 +72,19 @@ supabase: Client = create_client(url, key)

Use the supabase client to interface with your database.

#### Sign-up
### Sign-up

```python
user = supabase.auth.sign_up({ "email": users_email, "password": users_password })
```

#### Sign-in
### Sign-in

```python
user = supabase.auth.sign_in_with_password({ "email": users_email, "password": users_password })
```

#### Insert Data
### Insert Data

```python
data = supabase.table("countries").insert({"name":"Germany"}).execute()
Expand All @@ -89,7 +93,7 @@ data = supabase.table("countries").insert({"name":"Germany"}).execute()
assert len(data.data) > 0
```

#### Select Data
### Select Data

```python
data = supabase.table("countries").select("*").eq("country", "IL").execute()
Expand All @@ -98,13 +102,13 @@ data = supabase.table("countries").select("*").eq("country", "IL").execute()
assert len(data.data) > 0
```

#### Update Data
### Update Data

```python
data = supabase.table("countries").update({"country": "Indonesia", "capital_city": "Jakarta"}).eq("id", 1).execute()
```

#### Update data with duplicate keys
### Update data with duplicate keys

```python
country = {
Expand All @@ -116,13 +120,13 @@ data = supabase.table("countries").upsert(country).execute()
assert len(data.data) > 0
```

#### Delete Data
### Delete Data

```python
data = supabase.table("countries").delete().eq("id", 1).execute()
```

#### Call Edge Functions
### Call Edge Functions

```python
def test_func():
Expand All @@ -134,15 +138,15 @@ def test_func():
print(err.get("message"))
```

#### Download a file from Storage
### Download a file from Storage

```python
bucket_name: str = "photos"

data = supabase.storage.from_(bucket_name).download("photo1.png")
```

#### Upload a file
### Upload a file

```python
bucket_name: str = "photos"
Expand All @@ -151,23 +155,23 @@ new_file = getUserFile()
data = supabase.storage.from_(bucket_name).upload("/user1/profile.png", new_file)
```

#### Remove a file
### Remove a file

```python
bucket_name: str = "photos"

data = supabase.storage.from_(bucket_name).remove(["old_photo.png", "image5.jpg"])
```

#### List all files
### List all files

```python
bucket_name: str = "charts"

data = supabase.storage.from_(bucket_name).list()
```

#### Move and rename files
### Move and rename files

```python
bucket_name: str = "charts"
Expand All @@ -184,28 +188,29 @@ data = supabase.storage.from_(bucket_name).move(old_file_path, new_file_path)
- [ ] Add support for EXPLAIN
- [ ] Add proper error handling
- [ ] Wrap [Realtime-py](https://github.com/supabase-community/realtime-py)
- [ ] Integrate with Supabase-py
- [ ] Support WALRUS
- [ ] Support broadcast (to check if already supported)
- [ ] Integrate with Supabase-py
- [ ] Support WALRUS
- [ ] Support broadcast (to check if already supported)
- [x] Wrap [auth-py](https://github.com/supabase-community/auth-py)
- [x] Remove references to GoTrue-js v1 and do a proper release
- [ ] Test and document common flows (e.g. sign in with OAuth, sign in with OTP)
- [ ] Add MFA methods and SSO methods
- [x] Add Proof Key for Code Exchange (PKCE) methods. Unlike the JS library, we do not currently plan to support Magic Link (PKCE). Please use the [token hash](https://supabase.com/docs/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr#create-api-endpoint-for-handling-tokenhash) in tandem with `verifyOTP` instead.
- [x] Remove references to GoTrue-js v1 and do a proper release
- [ ] Test and document common flows (e.g. sign in with OAuth, sign in with OTP)
- [ ] Add MFA methods and SSO methods
- [x] Add Proof Key for Code Exchange (PKCE) methods. Unlike the JS library, we do not currently plan to support Magic Link (PKCE). Please use the [token hash](https://supabase.com/docs/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr#create-api-endpoint-for-handling-tokenhash) in tandem with `verifyOTP` instead.
- [x] Wrap [storage-py](https://github.com/supabase-community/storage-py)
- [ ] Support resumable uploads
- [x] Setup testing environment
- [x] Document how to properly upload different file types (e.g. jpeg/png and download it)
- [ ] Support resumable uploads
- [x] Setup testing environment
- [x] Document how to properly upload different file types (e.g. jpeg/png and download it)
- [x] Wrap [functions-py](https://github.com/supabase-community/functions-py)

Overall Tasks:
### Overall Tasks

- [x] Add async support across the entire library
- [ ] Add FastAPI helper library (external to supabase-py)
- [ ] Add `django-supabase-postgrest` (external to supabase-py)

## Contributing

Contributing to the Python libraries are a great way to get involved with the Supabase community. Reach out to us on <a href="https://discord.supabase.com/">Discord</a> or on our <a href="https://github.com/orgs/supabase/discussions">Github Discussions</a> page if you want to get involved.
Contributing to the Python libraries are a great way to get involved with the Supabase community. Reach out to us on [Discord](https://discord.supabase.com) or on our [Github Discussions](https://github.com/orgs/supabase/discussions) page if you want to get involved.

### Running Tests

Expand Down

0 comments on commit c38a2bf

Please sign in to comment.