Metadata-Version: 2.1
Name: qwhale-client
Version: 0.1.7
Summary: Python client for Qwhale API
Home-page: https://qwhale.ml
Author: Yehoyada.s
Author-email: hvuhsg6@gmail.com
License: MIT
Download-URL: https://github.com/hvuhsg/qwhale_client/archive/0.1.2.tar.gz
Keywords: API,Client,Qwhale,QWhale,client,storage,MongoDB
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
Requires-Dist: pymongo
Requires-Dist: requests

# qwhale-client

#### This is the official python client library

The library is simple, all you need is a TOKEN that you can get from our website [hare](http://qwhale.ml)
and that it! you are ready to work with our service.


The library works with [_pymongo_](https://github.com/mongodb/mongo-python-driver) so you can use it like you use to.

**code example**
```python
from qwhale_client import APIClient

TOKEN = "<YOUR API TOKEN>"

client = APIClient(TOKEN)

with client as database:
    print(client.activated)  # -> True
    database["test"].insert_one({"key": "value", "extra": "123456"})
    document = database["test"].find_one({"key": "value"})
    print(document)  # -> {"_id": ObjectId(...), "key": "value", "extra": "123456"}

print(client.activated)  # -> False
```

**Another code example**
```python
from qwhale_client import APIClient

TOKEN = "<YOUR API TOKEN>"

client = APIClient(TOKEN)

database = client.get_database()
print(client.activated)  # -> True

database["test"].insert_one({"key": "value", "extra": "123456"})
document = database["test"].find_one({"key": "value"})
print(document)  # -> {"_id": ObjectId(...), "key": "value", "extra": "123456"}

print(client.close())  # -> {'data_saved': True}
print(client.activated)  # -> False
```

