borisat
a python library for retrieving company public data in thailand. It has its own public database for caching, so, it is really fast, smart, and save lot of time and energy.
Get Started
pip install borisat
import borisat
a_valid_tax_id = tax_id = '0105558096348'
if borisat.is_exist(tax_id):
company = borisat.get_info(tax_id=tax_id)
print(company)
# NID='0105558096348' title_name='บริษัท' name='โฟลว์แอคเคาท์ จำกัด' surname='-' branch_name='โฟลว์แอคเคาท์ จำกัด' branch_number=0 branch_title_name='บริษัท' business_first_date='2016/04/07' building_name='ชุดสกุลไทย สุรวงศ์ ทาวเวอร์' floor_number='11' room_number='12B' village_name='-' house_number='141/12' moo_number='-' soi_name='-' street_name='สุรวงศ์' thambol='สุริยวงศ์' amphur='บางรัก' province='กรุงเทพมหานคร' post_code='10500'
another_valid_tax_id = tax_id = "0994000160097"
company = borisat.get_info(tax_id=tax_id)
print(company)
# NID='0994000160097' title_name='มหาวิทยาลัย' name='เทคโนโลยีพระจอมเกล้าธนบุรี' surname='-' branch_name='กลุ่มงานส่งเสริมและบริการวิจัย' branch_number=0 branch_title_name='-' business_first_date='2013/09/17' building_name='สำนักงานอธิการบดี' floor_number='-' room_number='-' village_name='-' house_number='126' moo_number='-' soi_name='-' street_name='ประชาอุทิศ' thambol='บางมด' amphur='ทุ่งครุ' province='กรุงเทพมหานคร' post_code='10140'
Why it is the way it is?
- the government public api is obsolete, doc is unclear and this is 2020, and it is SOAP api. OMG. thus, we need some kinds of modern interface.
- retriving data from the government public api is F**king slow in the business hours. thus, we need some kinds of cache. a public one where who use this lib could enjoy.
A public cache?
There is no such thing as a public cache/database. There is a close thing.
- Public Google BigQuery
- Smart contact. Blockchain
being a cache key value access is so critical. if you use BigQuery to query for a single row, since it is a column-based db in will cost a lot when your database get bigger, very costly. and to let other have your write-only key to the database is nut.
on surface Blockchain seems legit. there is a mapping data type on solidity. Wow, this might be a way to go. I took my word back when I saw a blog, No, you don’t store data on the blockchain – here’s why 1MB for 700 Dollars, holy cow! I knows that there is a hashgraph blockchain. the price is great, but there is no official python support + the unofficial is 2 years old of unmaintain.
ok then, my last combo would be create a cache serverless api + store on a serverless database which I pay myself and let the lib call my fast api first, if there is no data, call the gov server, then lib call my api to store the cache. open source everything that is my experiment.
Roadmap
See project board
Metadata
Release files for borisat 1.0.0
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 | |
|---|---|---|---|---|
| borisat-1.0.0.tar.gz | 5.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| borisat-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / borisat-1.0.0.tar.gz
| Download URL | borisat-1.0.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff8b4f30213455033535d156ed8a93c41127e2041166ad8493036ef8483dca74
|
|
BLAKE2b-256 checksum How to use checksums |
6d3c8b0add910d68935cbe278f540aa410fa2854df250f5a99cf5961bfe167ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.2 CPython/3.8.6 Windows/10
|
Release files / borisat-1.0.0-py3-none-any.whl
| Download URL | borisat-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8bafd1b03456b6ddba206dd3dbc939234c8c6f0bc4c8167d7577049614e8a96
|
|
BLAKE2b-256 checksum How to use checksums |
c4ae3d844504828d01dff583ebcb19cd1207daeebaf3a477f70a49748f94e1ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.2 CPython/3.8.6 Windows/10
|
Security for borisat 1.0.0
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.