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.5.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.5-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: worlddata-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 55f214ce1c081436d6c33c5e4e05a28c06ca75b44884746c2c23d991fa9ae733
MD5 57b668d070c5d518145cb5f9a3683f1d
BLAKE2b-256 6821b76796b7c4e8b32580970b1129d99e90c55c8d193a138dab38007ff84f18

See more details on using hashes here.

File details

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

File metadata

  • Download URL: worlddata-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1c0cce1e9ae6270b1e7452b788364fc9d7b72c9a51a7338d27beedd6023ee055
MD5 2f36c45f8a7e1acdc171d4cda87c7a31
BLAKE2b-256 ab4c534d6e75d7bf16c49777b749fb1c4335c2a49407f9f661b28cd769a677fe

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