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

from tianyancha import Tianyancha
token = "TOKEN"
word = "北京百度网讯科技有限公司"

tyc = Tianyancha(token)
ret = tyc.search(word)
{
  "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})

API Mappings : https://open.tianyancha.com/api_list

Tests

just run pytest

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.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distributions

tianyancha-0.1.0-py3.7.egg (4.1 kB view details)

Uploaded Source

tianyancha-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tianyancha-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 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.0.tar.gz
Algorithm Hash digest
SHA256 eef38734abc4d18a6ef28a1dea2f85eb58b6d8367416405d526afe236413f476
MD5 e9161db5557fc1f83bdec7ce69e3a0d9
BLAKE2b-256 a22562328663c5da3d45a6df4e3e74186ed2250c0e77a5fc80c2960d46c05a5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tianyancha-0.1.0-py3.7.egg
  • Upload date:
  • Size: 4.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.0-py3.7.egg
Algorithm Hash digest
SHA256 b9083a5d9efdca81df2323c4073e163bcf390d1cbf2ad6da43908bd5f7714975
MD5 83a038bb91f8e834cb18449b37a5f6b1
BLAKE2b-256 9fc45d392c5be306a72e8a3fb88defde6cefe1ad9d89ef100aff91046e396b41

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tianyancha-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21f53e6dc62751bba5d6b04f692ef8d00ad35a27f96da0b174b10a6639c16a0f
MD5 3cc79a4040cbabf96d5cd80723f71be0
BLAKE2b-256 66d52d78c4a5242e80d1b802f1b7e03c14208134361c8b18927a0abf781d8215

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