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.4.tar.gz (5.8 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.4-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: worlddata-0.0.4.tar.gz
  • Upload date:
  • Size: 5.8 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.4.tar.gz
Algorithm Hash digest
SHA256 014869b170e2f9c0b2b48babf21d0e226e734f315cea4ff705e60e5022171aa4
MD5 6e71b657303f7a1223e533e817316b09
BLAKE2b-256 35646b9ceab54ee339e5d357d80fc7d697f063cc7aa0e3baef3d28d0b130f06a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: worlddata-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d02261fa81862ec2a853e9d9aad566cf9acb5f38db079abbb8be24dd07b0f7d1
MD5 fddba7c0ce465304356fd40b55b6f379
BLAKE2b-256 266eaca7f55ea548529b0d3156042fb9bfd46fdb3fc602cda13d227649777cf5

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