Skip to main content

A tool for local http server!

Project description

AkTools

AkTools is a package for local HTTP server for AkShare!

It depends on AkShare and FastAPI.

pip install aktools

AkShare

[...]

FastAPI

[...]

Demo

Installation[windows]

pip install akshare
pip install fastapi[all]

Run CMD command[windows]

1. cd into the path of aktools: e.g., aktools/news/
2. then type the cmd command ```uvicorn news_api:app --reload```, just as ```C:\Anaconda3\envs\ak_test\Lib\site-packages\aktools\news>uvicorn news_api:app --reload```
3. type ```http://127.0.0.1:8000/amac_fund_abs``` in your chrome for test

Test-R

R-Program

library(RCurl)
library(jsonlite)

url <- "http://127.0.0.1:8000/stock_js_weibo_report_df"
temp_df <- getURI(url, .encoding = "utf-8")
inner_df <- fromJSON(temp_df)
df <- t(rbind(inner_df$name, inner_df$rate))
colnames(df) <- c("name", "rate")
print(df)

Result

   name       rate    
0  "北玻股份" "-10.06"
1  "乾照光电" "-10.00"
2  "紫江企业" "-10.02"
3  "铜峰电子" "10.08" 
4  "晶方科技" "-10.00"
5  "希努尔"   "4.90"  
6  "株冶集团" "0.00"  
7  "东方财富" "1.33"  
8  "秀强股份" "-9.96" 
9  "方直科技" "10.00" 
10 "三五互联" "10.04" 
11 "得润电子" "7.91"  
12 "泰达股份" "-2.19" 
13 "万达信息" "6.82"  
14 "台基股份" "-9.98" 
15 "牧原股份" "2.24"  
16 "长高集团" "9.93"  
17 "合肥城建" "10.04" 
18 "碧水源"   "9.17"  
19 "海陆重工" "-9.98" 
20 "中国软件" "-0.11" 
21 "苏大维格" "6.94"  
22 "立思辰"   "7.80"  
23 "涪陵榨菜" "4.39"  
24 "雪浪环境" "10.03" 
25 "湘电股份" "-5.74" 
26 "同花顺"   "2.15"  
27 "贵州茅台" "1.28"  
28 "万邦达"   "7.01"  
29 "东华科技" "9.99"  
30 "福建水泥" "6.62"  
31 "科斯伍德" "10.00" 
32 "国电南自" "10.08" 
33 "江淮汽车" "2.21"  
34 "欧菲光"   "-4.25" 
35 "太极实业" "-9.76" 
36 "华天科技" "-5.40" 
37 "宏润建设" "10.13" 
38 "新开普"   "9.71"  
39 "上峰水泥" "5.01"  
40 "中信证券" "0.24"  
41 "荣科科技" "10.07" 
42 "哈投股份" "0.91"  
43 "中国平安" "-0.05" 
44 "山东路桥" "10.00" 
45 "宜通世纪" "-9.13" 
46 "东易日盛" "9.95"  
47 "汉钟精机" "9.96"  
48 "三一重工" "4.73"  
49 "华塑控股" "10.19"

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

aktools-0.0.13.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aktools-0.0.13-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file aktools-0.0.13.tar.gz.

File metadata

  • Download URL: aktools-0.0.13.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for aktools-0.0.13.tar.gz
Algorithm Hash digest
SHA256 be9452cd73f96b6d734b05210cc68f830b11c296834ff033fa82e37c9412524f
MD5 6b30a4c8cade152cdb96f5675860958f
BLAKE2b-256 eaaee85c6b10d1bf8474dc70cb3e5af0f2ea5fcb18893cd7c84bbe3128da8471

See more details on using hashes here.

File details

Details for the file aktools-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: aktools-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for aktools-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 e8cb1994e9c0539a2b9cd23a2cc9293064378f55b67e94e7b4eb493baecf374e
MD5 e560a7c374d34ad111b99d57332ae705
BLAKE2b-256 7c997e922babf8a595d56d42f9917e163951fc68971601662e91ead3ea8e8d4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page