Skip to main content

Python API wrapper for WorldData.AI

Project description

WorldData.AI

Python API wrapper for WorldData.AI

Installation

  • From pypi: pip3 install worlddata
  • From GitHub: Clone our repository and python3 setup.py install Or pip install git+https://github.com/worlddata-ai/python-api.git

Requirements

Usage

from pprint import pprint
from worlddata.worlddata import WorldData

worlddata = WorldData(auth_token = '1212312-12312312')
pprint(worlddata.search(search_text = 'worlddata'))

Connection pooling

If you are going to make a couple of request, you can user connection pooling provided by requests. This will save significant time by avoiding re-negotiation of TLS (SSL) with the chat server on each call.

from requests import sessions
from pprint import pprint
from worlddata.worlddata import WorldData

with sessions.Session() as session:
    worlddata = WorldData(auth_token = '1212312-12312312')
    pprint(worlddata.search('worlddata'))

Method parameters

Only required parameters are explicit on the WorldData class but you can still use all other parameters. For a detailed parameters list check the WorldData.AI

API coverage

Most of the API methods are already implemented. If you are interested in a specific call just open an issue or open a pull request.

Tests

We are actively testing :)

Contributing

You can contribute by doing Pull Requests. (It may take a while to merge your code but if it's good it will be merged). Please, try to implement tests for all your code and use a PEP8 compliant code style.

Reporting bugs and asking for features is also contributing ;) Feel free to help us grow by registering issues.

We hang out here if you want to talk.

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

worlddata-0.0.6.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

worlddata-0.0.6-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file worlddata-0.0.6.tar.gz.

File metadata

  • Download URL: worlddata-0.0.6.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for worlddata-0.0.6.tar.gz
Algorithm Hash digest
SHA256 6d6fe1ce7cea41fd4923ca235ab698d636b900c9af784c20e708087930435272
MD5 9f0a7fb6527f10979c01c64cff905a6d
BLAKE2b-256 59e822deed767f18b60cefc87d8ef3f1469d29f1026c4efa1d9a10e25ddabeb4

See more details on using hashes here.

File details

Details for the file worlddata-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: worlddata-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for worlddata-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5ee14479ef7c427c947ec229c5bc8e29c90f457e8180e4c0b145dbdc3c2934af
MD5 a2273ba093da4992e1d39f9e6e7cde14
BLAKE2b-256 4e848752dfd8c36edc721e8cfbc0ce071713b631972c65eccb1b134215417266

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