vaphes / pocketbase

PocketBase client SDK for python
https://pypi.org/project/pocketbase/
MIT License
331 stars 38 forks source link

Introduce backups service. #87

Closed slobberchops closed 4 months ago

slobberchops commented 4 months ago

It was not possible to support any of the standard API CRUD operations provided by the BaseCrudService on account of the Backups API returning very different structures in most requests and responses. It would have required changing the interface for the class which seemed dangerous. Therefore, the API for Backups is a little more bespoke.

The tests for the Backups API is also a little different in that it seems like a somewhat heavier type of operation than other operations and lent itself better to doing verification that the underlying APIs were in fact called.

The download interface also has an optional parameter for file_token. Not providing one is easier to use, but could create a poor usage pattern as it is more inefficient for multiple download calls. If the reviewer could provide feedback as to whether it is desirable or acceptable it would be welcome.

slobberchops commented 4 months ago

I have verified that test workflow runs and all tests pass for all supported Python versions.

vaphes commented 4 months ago

@slobberchops Thanks a lot for your contribution. Sorry for the wait.

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9044392827

Details


Totals Coverage Status
Change from base Build 8850640839: 0.5%
Covered Lines: 834
Relevant Lines: 888

💛 - Coveralls
coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9044392827

Details


Totals Coverage Status
Change from base Build 8850640839: 0.5%
Covered Lines: 834
Relevant Lines: 888

💛 - Coveralls