Skip to main content

Tianyancha SDK for python, which based on https://open.tianyancha.com/

Project description

tianyancha - 天眼查

Tianyancha SDK for python, which based on https://open.tianyancha.com/

install

pip install tianyancha

Usage

All API supported! please visit Supported methods for more information!

from tianyancha import Tianyancha

token = "TOKEN"
word = "北京百度网讯科技有限公司"
tyc = Tianyancha(token)
ret = tyc.search(word=word)  # Limited to use `keyword arguments`
{
  "error_code": 0,
  "reason": "ok",
  "result": {
    "items": [
      {
        "regNumber": "110108002734659",
        "regStatus": "在业",
        "creditCode": "91110000802100433B",
        "estiblishTime": "2001-06-05 00:00:00.0",
        "regCapital": "1342128万人民币",
        "companyType": 1,
        "name": "<em>北京百度网讯科技有限公司</em>",
        "id": 22822,
        "orgNumber": "802100433",
        "type": 1,
        "base": "北京",
        "legalPersonName": "梁志祥"
      },
      {
        "regNumber": "440106000623068",
        "regStatus": "在业",
        "creditCode": "91440101675657502F",
        "estiblishTime": "2008-05-20 00:00:00.0",
        "regCapital": "-",
        "companyType": 1,
        "name": "<em>北京百度网讯科技有限公司</em>广州分公司",
        "id": 139572971,
        "orgNumber": "675657502",
        "type": 1,
        "base": "广东",
        "legalPersonName": "沈抖"
      },
      ...
    ],
    "total": 56
  }
}

More usages

ret = tyc.get('search/2.0', {'word': word})

Tests

just run pytest

Changelog

  • 2020-12-11 0.1.2 path bugfix and generate documents for all methods
  • 2020-12-11 0.1.1 support all methods
  • 2020-12-11 0.1.0 support basic search for tianyancha

Refs

Official API Document: https://open.tianyancha.com/api_list

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tianyancha-0.1.3.tar.gz (33.1 kB view details)

Uploaded Source

Built Distributions

tianyancha-0.1.3-py3.7.egg (34.9 kB view details)

Uploaded Source

tianyancha-0.1.3-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file tianyancha-0.1.3.tar.gz.

File metadata

  • Download URL: tianyancha-0.1.3.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for tianyancha-0.1.3.tar.gz
Algorithm Hash digest
SHA256 86a699f143723d8792ec68e3d89dbdb504bb1b9a1f276a0a6f233b4525123f89
MD5 a074da928accac2699ae58a1a68142df
BLAKE2b-256 9677485e50a33404e5ed0a701d34af4a07b4e27eb43bf7bb58c21fa28120c416

See more details on using hashes here.

File details

Details for the file tianyancha-0.1.3-py3.7.egg.

File metadata

  • Download URL: tianyancha-0.1.3-py3.7.egg
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for tianyancha-0.1.3-py3.7.egg
Algorithm Hash digest
SHA256 e467de50cb3d37eb42c6dfbf00d940df64dd4c88f5a9c81952e3e3af10f1f6dc
MD5 f21f0ceb6f6e3631d0175d1f01a0dbae
BLAKE2b-256 5ed7467118e16810178e37803a5c7dbfc498dbf286de3af0c53199e22f4b2c1d

See more details on using hashes here.

File details

Details for the file tianyancha-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tianyancha-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for tianyancha-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 70d377add64850dcf1892c5f770fc2e05c66459c5396dce0afc992bb2f61d242
MD5 2dde7d8604d6117cfe2951f7682d7758
BLAKE2b-256 0a88003a1653c3e2fdbc70df90d158f206a37039adcc63ff5d0c0cc331745724

See more details on using hashes here.

Supported by

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