https://github.com/sarvesh4396/pantry-cloud
Python implementation of Free JSON Storage API pantry.
https://github.com/sarvesh4396/pantry-cloud
api basket cloud-storage json pantry pantry-cloud
Last synced: 3 months ago
JSON representation
Python implementation of Free JSON Storage API pantry.
- Host: GitHub
- URL: https://github.com/sarvesh4396/pantry-cloud
- Owner: sarvesh4396
- License: mit
- Created: 2021-06-12T06:26:03.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-04T09:36:05.000Z (almost 5 years ago)
- Last Synced: 2026-04-07T07:49:23.618Z (3 months ago)
- Topics: api, basket, cloud-storage, json, pantry, pantry-cloud
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pantry-cloud


[](https://github.com/sarvesh4396/pantry-cloud/issues)
[](https://github.com/sarvesh4396/pantry-cloud/network)
[](https://github.com/sarvesh4396/pantry-cloud/stargazers)
[](https://github.com/sarvesh4396/pantry-cloud/blob/main/LICENSE)


This lightweight [package](https://github.com/sarvesh4396/pantry-cloud) is a python implementation of Free JSON Storage API [pantry](https://getpantry.cloud/).
## Features
- Creates a basket.
- Deletes a basket.
- Updates a basket.
- Shows account details.
- Writes basket data in json file.
> The aim of this package is to make `pantry` api usage simple.
## Installation
pantry-cloud requires [python3.7+](https://www.python.org/downloads/) to run.
#### Windows
```sh
pip install pantry-cloud
or
pip install --upgrade pantry-cloud
```
#### Linux
```sh
pip3 install pantry-cloud
or
pip3 install --upgrade pantry-cloud
```
## Module Usage
#### Creating basket
```sh
from pantry_cloud import Pantry
pantry = Pantry(api_key='your api key')
res = pantry.create(basket='hello', inputfile='path to json file') # Use inputfile if you want to upload data
print(res)
```
#### Basket detail
```sh
from pantry_cloud import Pantry
pantry = Pantry(api_key='your api key')
res = pantry.basket(basket='hello', outputfile='path to json file') # Use outputfile if you want to write data data
print(res)
```
## CLI Usage
```sh
usage: pantry [-h] -a API [-o OUTPUT_FILE] [-i INPUT_FILE] [-s] [-b BASKET] [-u UPDATE] [-c CREATE] [-d DELETE]
optional arguments:
-h, --help show this help message and exit
-a API, --api API api key.
-o OUTPUT_FILE, --output OUTPUT_FILE
output file.
-i INPUT_FILE, --input INPUT_FILE
input file.
-s, --show Shows account details.
-b BASKET, --basket BASKET
Shows data of a basket.
-u UPDATE, --update UPDATE
Updates a basket.
-c CREATE, --create CREATE
Creates a new basket , or replace an existing one.
-d DELETE, --delete DELETE
Deletes the entire basket.
```