The service of NeuroStats website
Project description
neurostats_API
檔案架構
./neurostats_API
├── async_mode
│ ├── db
│ ├── db_extractors
│ │ ├── daily
│ │ ├── month_revenue
│ │ └── seasonal
│ ├── factory
│ └── fetchers
├── config
│ ├── company_list
│ ├── tej_db
│ └── twse
├── fetchers
├── transformers
│ ├── balance_sheet
│ ├── cash_flow
│ ├── daily_chip
│ │ └── utils
│ ├── daily_tech
│ │ └── utils
│ ├── finance_overview
│ ├── month_revenue
│ ├── profit_lose
│ ├── tej
│ └── value
└── utils
neurostats_API: 主要的package運行內容async_mode: [新版新增]以非同步方式進行DB資料的取得以及回傳資料/db: 連接到伺服器下的特定db/db_extractor: 決定取得db下的哪個collection的檔案,以及取得檔案內容/factory`: 使extractor的初始化變得通用/fetchers: 開發者將此套件用於其他專案的接口
fetchers: (舊版)回傳service內容的fetcher檔案夾transformers: [新版新增] 處理從DB取出的資料,以dictionary的方式回傳需要的資料config: 【新舊通用】存放各種設定檔的dictionary,例如公司名單、各項指標對應的計算欄位、每個項目屬於哪份財報等設定utils: 【新舊通用】class之間通用的函式,例如讀取檔案、計算成長率函式、轉換格式與進位等
下載
pip install neurostats-API
確認下載成功
>>> import neurostats_API
>>> print(neurostats_API.__version__)
1.0.3rc1
下載舊版
pip install neurostats-API==0.0.25
使用方式 (以Balance_Sheet為例)
Async Mode
from neurostats_API.async_mode.fetchers import AsyncBalanceSheetFetcher
from pymongo import AsyncMongoClient
db_client = AsyncMongoClient("<伺服器的MONGO_URI>")
ticker = "2330"
fetcher = AsyncBalanceSheetFetcher(ticker, db_client)
data = await fetcher.query_data()
print(data)
詳細各個fetcher的使用法請到async_mode的fetchers資料夾下觀看
Sync Mode
(#TODO)
舊版使用方法請到fetchers資料夾下觀看
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
neurostats_api-1.0.3rc1.tar.gz
(484.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neurostats_api-1.0.3rc1.tar.gz.
File metadata
- Download URL: neurostats_api-1.0.3rc1.tar.gz
- Upload date:
- Size: 484.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67505978778ba1a16b3f719faf2c074cef9a715fa44871b857af334fea5aae20
|
|
| MD5 |
745d4959130997751d2e1f4729df2f8f
|
|
| BLAKE2b-256 |
23227a90683b967db07eab2f8c95a91189b3531d11e407bd1abb318cbbb5ac83
|
File details
Details for the file neurostats_API-1.0.3rc1-py3-none-any.whl.
File metadata
- Download URL: neurostats_API-1.0.3rc1-py3-none-any.whl
- Upload date:
- Size: 532.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75ce33a6d507f7a0db334f173a037f6d7e0592fb595fe36af30c26bac7e8d0a7
|
|
| MD5 |
bcfdee4db9ce1c5a6a047e9a4217d5b0
|
|
| BLAKE2b-256 |
c69cd7e582ff0c4e4d410584cd2889509156ebde5ac802fc933c1fe271849fdb
|