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_toke = '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.3.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.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: worlddata-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 4fa6a71decc2a0375f6f76714013d09d4bd00734e16b152f7315206a394f9d31
MD5 53f6b92d388f00d0d113f44bc08ce9dd
BLAKE2b-256 d37a4bb17a9f436164a0b4b9dce168fe58874fd7134be0795fbc0b023b429044

See more details on using hashes here.

File details

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

File metadata

  • Download URL: worlddata-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bde637d3cd59fcefda26ede262d660aa65fb9053bf8336a5aeba6a5a3e7c71ea
MD5 1854263a0ab242af4b8a839869798210
BLAKE2b-256 47dd26526240b29b4164bd0d0e7d6011697224191432a7d8679be9f853057d94

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