db_sheet: Using Google Spreadsheets as Database.
Project description
# DBSheet
Using google spreadsheets as database.
## This package helps you make use of google sheets as databases. What all it supports
1. Creating Tables
2. Inserting Rows
3. Get all records
4. Search for One Row
5. Search for particular number of Rows
## How to initialize
```python
from db_sheet.db_sheet import DbSheet
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
db = DbSheet(db_name = "SHEETBACKEND", api_creds = "client_secret.json", scope = ['https://spreadsheets.google.com/feeds'])
sheet = db.get_db_conn()
```
Sheet is like database.
### Creating tables
```python
from db_sheet.db_sheet import DbSheet
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
db = DbSheet(db_name = "SHEETBACKEND", api_creds = "client_secret.json", scope = ['https://spreadsheets.google.com/feeds'])
sheet = db.get_db_conn()
table = Table({"Col1","col2"},"name_of_table")
creator = CreateTable(table, sheet)
creator.create_table()
```
### Inserting Rows
```python
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
working_table = WorkingTable("tablename",sheet)
working_table.insert({"value1","value2"}
```
### Get all records
```python
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
working_table = WorkingTable("tablename",sheet)
working_table.get_all()
```
### Search for One Row
```python
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
working_table = WorkingTable("tablename",sheet)
working_table.get_one("column_name",value)
```
### Search for particular number of Rows
```python
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
working_table = WorkingTable("tablename",sheet)
working_table.find("column_name",value,total_count_u_need)
```
## Contribution:
### You can contibute by following below simple steps.
1. Make sure your build is passing
2. Keep your code clean and proper commenting with pep8.
Thats it for now. Will add more since its just a begginging.
Suggestions are welcome. Please create an issue if you think this is **** and you can make it better :D
@ Author: chowmean
Using google spreadsheets as database.
## This package helps you make use of google sheets as databases. What all it supports
1. Creating Tables
2. Inserting Rows
3. Get all records
4. Search for One Row
5. Search for particular number of Rows
## How to initialize
```python
from db_sheet.db_sheet import DbSheet
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
db = DbSheet(db_name = "SHEETBACKEND", api_creds = "client_secret.json", scope = ['https://spreadsheets.google.com/feeds'])
sheet = db.get_db_conn()
```
Sheet is like database.
### Creating tables
```python
from db_sheet.db_sheet import DbSheet
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
db = DbSheet(db_name = "SHEETBACKEND", api_creds = "client_secret.json", scope = ['https://spreadsheets.google.com/feeds'])
sheet = db.get_db_conn()
table = Table({"Col1","col2"},"name_of_table")
creator = CreateTable(table, sheet)
creator.create_table()
```
### Inserting Rows
```python
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
working_table = WorkingTable("tablename",sheet)
working_table.insert({"value1","value2"}
```
### Get all records
```python
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
working_table = WorkingTable("tablename",sheet)
working_table.get_all()
```
### Search for One Row
```python
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
working_table = WorkingTable("tablename",sheet)
working_table.get_one("column_name",value)
```
### Search for particular number of Rows
```python
from db_sheet.sheet_table import WorkingTable, CreateTable, Table
working_table = WorkingTable("tablename",sheet)
working_table.find("column_name",value,total_count_u_need)
```
## Contribution:
### You can contibute by following below simple steps.
1. Make sure your build is passing
2. Keep your code clean and proper commenting with pep8.
Thats it for now. Will add more since its just a begginging.
Suggestions are welcome. Please create an issue if you think this is **** and you can make it better :D
@ Author: chowmean
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
db_sheet-0.1.2.tar.gz
(3.5 kB
view details)
File details
Details for the file db_sheet-0.1.2.tar.gz
.
File metadata
- Download URL: db_sheet-0.1.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/36.2.7 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8377db370a6a74d115ae061082795299abbca60da26a4f51478bdfcb852d5a0 |
|
MD5 | 9074148a097af1b0c9e580f0cfcb162c |
|
BLAKE2b-256 | 678b8c523245ef5e2cad49afe9ae88678a05b7425a1d2e009590aa6648decebc |