boklib
usage
from boklib import bok
api_key = 'example' # get an api key in this site: https://ecos.bok.or.kr/jsp/openapi/OpenApiController.jsp?t=main
lang = '' # 'kr'or 'en'
state_code = '' # get a state_code in table_list or get a state_code in item_list
cycle = '' # get a cycle in item_list
start_date = '' # get a start_date in item_list
end_date = '' # get a end_date in item_list
item_code = '' # get a item_code in item_list
bok = bok(api_key, lang)
result_key_list = bok.key_List()
result_table_list = bok.table_list()
result_item_list = bok.item_list(stat_code)
result_search = bok.search(stat_code, cycle, start_date, end_date, item_code)
result_meta = bok.meta(meta_search_word) # maybe korean language only - site: https://ecos.bok.or.kr/jsp/use/metadata/MetaData.jsp
result_word = bok.word(search_word) # maybe korean language only - site: https://ecos.bok.or.kr/jsp/use/metaword/MetaDataWordList.jsp
for result in result_key_list['row']:
class_name = result['CLASS_NAME']
keystat_name = result['KEYSTAT_NAME']
data_value = result['DATA_VALUE']
cycle = result['CYCLE']
unit_name = result['UNIT_NAME']
print('class_name = %s, keystat_name = %s, data_value = %s, cycle = %s, unit_name = %s' % (class_name, keystat_name, data_value, cycle, unit_name))
#
# --- result example ---
# {'list_total_count': {}, 'row' : [] }
#
# print result_key_list
# {'list_total_count' : 1, 'row' : [{'CLASS_NAME' : '', 'KEYSTAT_NAME' : '', 'DATA_VALUE' : '', 'CYCLE' : '', 'UNIT_NAME' : ''}]}
#
# print result_table_list
# {'list_total_count': 1, 'row' : [{'P_STAT_CODE' : '', 'STAT_CODE' : '', 'STAT_NAME' : '', 'CYCLE' : '', 'SRCH_YN' : '', 'ORG_NAME' : ''}] }
#
# print result_item_list
# {'list_total_count' : 1, 'row' : [{'STAT_CODE' : '', 'STAT_NAME' : '', 'GRP_CODE' : '', 'GRP_NAME' : '', 'P_ITEM_CODE' : '', 'ITEM_CODE' : '', 'ITEM_NAME' : '', 'CYCLE' : '', 'START_TIME' : '', 'END_TIME' : '', 'DATA_CNT' : ''}]}
# print result_search
# {'list_total_count' : 1, 'row' : [{'STAT_CODE' : '', 'STAT_NAME' : '', 'ITEM_CODE1' : '', 'ITEM_CODE2' : '', 'ITEM_CODE3' : '', 'UNIT_NAME' : '', 'TIME' : '', 'DATA_VALUE' : ''}]}
#
# print result_meta
# {'list_total_count': 1, 'row' : [{'LVL' : '', 'P_CONT_CODE' : '', 'CONT_CODE' : '', 'CONT_NAME' : '', 'META_DATA' : ''}] }
#
# print result_word
# {'list_total_count': 1, 'row' : [{'WORD' : '', 'CONTENT' : ''}] }
#
Metadata
Release files for boklib 1.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 |
|---|---|---|---|---|
| boklib-1.1.tar.gz | 3.0 kB | Without provenance | Details for boklib-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| boklib-1.1-py3-none-any.whl | Python 3 | none | any | Details for boklib-1.1-py3-none-any.whl |
Total release size: 7.2 kB
Release files / boklib-1.1.tar.gz
| Download URL | boklib-1.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b411aeb5040210fba1104783e9384c2c69a259992c63fd680fa824309d561ec
|
|
BLAKE2b-256 checksum How to use checksums |
c98d7b8bff539e22312ef0044af03f3988867b500f9be0f5dbc4bee492630b06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / boklib-1.1-py3-none-any.whl
| Download URL | boklib-1.1-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2342e3f9e91f75b811fd80a5fb4557d5eae0f6dd43f4532617e9fa37f54d88e
|
|
BLAKE2b-256 checksum How to use checksums |
6acfdf1ad37cca8050e4b274059054d52ff942ac0e6076eb9d055b86a4faf3ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for boklib 1.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.