=========================
Python client to connect to REST based api
This is still in its early stages and needs more tests and functionality for PUT, POST, PATCH and DELETE methods
To run the tests
----------------
pip install -r test_requirements.txt
python tests.py
Usage
-----
If you are using Django put the following in to your settings file:
```python
BASE_API_URL = "http://yourdomain.com/api/v2/"
```
If you are not using Django create a file called settings.py in your project and add the line to that.
Models:
```python
from python_api_client.models import Model
class MyModel(Model):
"""
This assumes a url of http://yourdomain.com/api/v2/mymodels/...
if this is not the case you can override
@classmethod
def url(cls):
return 'whatever url you want'
"""
pass
```
Views:
```python
from .models import MyModel
my_models = MyModel.objects.all()
some_of_my_models = MyModel.objects.filter(something='s)
my_model = MyModel.objects.get(pk=2)
my_model.field = 'changed'
my_model.save()
```
Metadata
Release files for python_api_client 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_api_client-0.0.1.tar.gz | 6.5 kB | Without provenance | Details for python_api_client-0.0.1.tar.gz |
Release files / python_api_client-0.0.1.tar.gz
| Download URL | python_api_client-0.0.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5268b25b1e0bb3e0757f363eb687985ffceaa491255bba45657437f2beba049d
|
|
BLAKE2b-256 checksum How to use checksums |
4aa4bc63c01fdb1b753e46dd06ca79a5f9d53ba0a019528c7a5fa37c2683cf06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for python_api_client 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.