parent
d320125c58
commit
a690d451ab
40
README.md
40
README.md
@ -10,10 +10,10 @@ This is in early development, and at first is just a translation of <a href="htt
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Install PocketBase using pip:
|
Install PocketBase using PIP:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ pip install pocketbase
|
python3 -m pip install pocketbase
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@ -48,5 +48,39 @@ result = client.collection("example").create(
|
|||||||
```
|
```
|
||||||
> More detailed API docs and copy-paste examples could be found in the [API documentation for each service](https://pocketbase.io/docs/api-authentication). Just remember to 'pythonize it' 🙃.
|
> More detailed API docs and copy-paste examples could be found in the [API documentation for each service](https://pocketbase.io/docs/api-authentication). Just remember to 'pythonize it' 🙃.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
<p align="center"><i>The PocketBase Python SDK is <a href="https://github.com/vaphes/pocketbase/blob/master/LICENCE.txt">MIT licensed</a> code.</p>
|
These are the requirements for local development:
|
||||||
|
|
||||||
|
* Python 3.7+
|
||||||
|
* Poetry (https://python-poetry.org/)
|
||||||
|
|
||||||
|
You can install locally:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
poetry install
|
||||||
|
```
|
||||||
|
|
||||||
|
Or can build and generate a package:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
poetry build
|
||||||
|
```
|
||||||
|
|
||||||
|
But if you are using only PIP, use this command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python3 -m pip install -e .
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
To execute the tests use this command:
|
||||||
|
|
||||||
|
```
|
||||||
|
poetry run pytest
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The PocketBase Python SDK is <a href="https://github.com/vaphes/pocketbase/blob/master/LICENCE.txt">MIT licensed</a> code.
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
__title__ = "pocketbase"
|
__title__ = "pocketbase"
|
||||||
__description__ = "PocketBase client SDK for python."
|
__description__ = "PocketBase client SDK for python."
|
||||||
__version__ = "0.3.0"
|
__version__ = "0.8.0"
|
||||||
|
|
||||||
|
|
||||||
from .client import Client, ClientResponseError
|
from .client import Client
|
||||||
|
|
||||||
|
|
||||||
class PocketBase(Client):
|
class PocketBase(Client):
|
||||||
|
|||||||
@ -29,7 +29,7 @@ dynamic = ["readme", "version"]
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "pocketbase"
|
name = "pocketbase"
|
||||||
version = "0.3.0"
|
version = "0.8.0"
|
||||||
description = "PocketBase SDK for python."
|
description = "PocketBase SDK for python."
|
||||||
authors = ["Vithor Jaeger <vaphes@gmail.com>"]
|
authors = ["Vithor Jaeger <vaphes@gmail.com>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@ -5,7 +5,7 @@ from pocketbase.utils import camel_to_snake, to_datetime
|
|||||||
|
|
||||||
|
|
||||||
def test_version():
|
def test_version():
|
||||||
assert __version__ == "0.3.0"
|
assert __version__ == "0.8.0"
|
||||||
|
|
||||||
|
|
||||||
def test_utils():
|
def test_utils():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user