gssetting
About
gssetting is load setting value from Google Sheets.
Installation
To install gssetting, use pip.
pip install gssetting
Examples
Google Sheets example.
| A | name | empty | value |
|---|---|---|---|
| B | test1 | none | value |
| C | test2 | ok | value ok |
Sample code
from dataclasses import dataclass
from gssetting import GoogleSpreadSheetSetting, GSSetting
@dataclass
class Setting(GSSetting):
username: str
value: str
# Same header value of sheets
headers = ["name", "value"]
if __name__ == "__main__":
gs_setting = GoogleSpreadSheetSetting(
"./service_account.json", "document_id"
)
settings = gs_setting.load("sheet_name", "A1:C3", Setting)
print(settings)
for setting in settings:
print(setting.username.value)
Metadata
Release files for gssetting 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 |
|---|---|---|---|---|
| gssetting-0.0.1.tar.gz | 3.3 kB | Without provenance | Details for gssetting-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gssetting-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for gssetting-0.0.1-py3-none-any.whl |
Total release size: 9.0 kB
Release files / gssetting-0.0.1.tar.gz
| Download URL | gssetting-0.0.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dae9e1ab1cdceb0b203ab6d133cccf524d568a8b925e5d82a0a255f0fd840a8d
|
|
BLAKE2b-256 checksum How to use checksums |
b53a547f3c9087f8ba2c76841785b60ea14105b323d1e12b9b8c8fce242d4ded
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5
|
Release files / gssetting-0.0.1-py3-none-any.whl
| Download URL | gssetting-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d542a31072523314f20777d836af7d781f72f94f3fa1101bcd8e0d5845378fee
|
|
BLAKE2b-256 checksum How to use checksums |
5bae860799b0b74e27f54036b721e6790c0edb75684cc1daffc2bdc1517f0b80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5
|
Security for gssetting 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.