Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ff559b85e | ||
|
|
99fccb3b0e | ||
|
|
c0afb20503 | ||
|
|
90bd223664 | ||
|
|
aacd12bafe |
39
.github/workflows/python-publish.yml
vendored
Normal file
39
.github/workflows/python-publish.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# This workflow will upload a Python Package using Twine when a release is created
|
||||||
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
||||||
|
|
||||||
|
# This workflow uses actions that are not certified by GitHub.
|
||||||
|
# They are provided by a third-party and are governed by
|
||||||
|
# separate terms of service, privacy policy, and support
|
||||||
|
# documentation.
|
||||||
|
|
||||||
|
name: Upload Python Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install build
|
||||||
|
- name: Build package
|
||||||
|
run: python -m build
|
||||||
|
- name: Publish package
|
||||||
|
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
__title__ = "pocketbase"
|
__title__ = "pocketbase"
|
||||||
__description__ = "PocketBase client SDK for python."
|
__description__ = "PocketBase client SDK for python."
|
||||||
__version__ = "0.8.0"
|
__version__ = "0.8.1"
|
||||||
|
|
||||||
|
|
||||||
from .client import Client
|
from .client import Client
|
||||||
|
|||||||
@@ -2,12 +2,13 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from pocketbase.models.utils.base_model import BaseModel
|
from pocketbase.models.utils.base_model import BaseModel
|
||||||
from pocketbase.utils import camel_to_snake
|
from pocketbase.utils import camel_to_snake
|
||||||
|
from dataclasses import dataclass, field
|
||||||
|
|
||||||
|
@dataclass
|
||||||
class Record(BaseModel):
|
class Record(BaseModel):
|
||||||
collection_id: str
|
collection_id: str
|
||||||
collection_name: str
|
collection_name: str = ""
|
||||||
expand: dict
|
expand: dict = field(default_factory=dict)
|
||||||
|
|
||||||
def load(self, data: dict) -> None:
|
def load(self, data: dict) -> None:
|
||||||
super().load(data)
|
super().load(data)
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ class RecordService(CrudService):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
response_data = self.client.send(
|
response_data = self.client.send(
|
||||||
self.base_collection_path() + "/auth-with-password",
|
self.base_collection_path() + "/auth-with-oauth2",
|
||||||
{
|
{
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"params": query_params,
|
"params": query_params,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ dynamic = ["readme", "version"]
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "pocketbase"
|
name = "pocketbase"
|
||||||
version = "0.8.0"
|
version = "0.8.1"
|
||||||
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.8.0"
|
assert __version__ == "0.8.1"
|
||||||
|
|
||||||
|
|
||||||
def test_utils():
|
def test_utils():
|
||||||
|
|||||||
Reference in New Issue
Block a user