Skip to main content

pycraftco is a Python library that serves as a convenient wrapper for Craft API (https://api.craft.co/docs/v1)

Project description

PYCRAFTCO

CircleCI

pycraftco is a Python library that serves as a convenient wrapper for Craft API.

Installation

You can install package via pip:

$ pip install pycraftco

Usage

The snippet below will retrieve name and offices of Facebook. For all available information please refer to https://api.craft.co/docs/v1/reference/company.doc.html. However, please note that the API documentation have all fields in camel case but the lib have them underscore-separated.

from pycraftco import get_company

api_key = 'qfNfdijpFhbhPhA7j2ZxvtEGkfv8DftTtmTEbnWN'

# specify what data to load in the callback
def company_query(company):
    company.display_name()
    company.locations.city()
    company.locations.hq()

# You can use duns, name_constains or domain to search for companies
c = get_company(company_query, name_contains='Facebook', api_key=os.environ['API_KEY'])

The code uses the test key that allows access to Facebook data only. Please, visit https://craft.co/business#business-form to request more permissive key.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/craft-machine/pycraftco .

License

The pip package is available as open source under the terms of the MIT License.

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

pycraftco-0.1.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file pycraftco-0.1.tar.gz.

File metadata

  • Download URL: pycraftco-0.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for pycraftco-0.1.tar.gz
Algorithm Hash digest
SHA256 7dd079c26a99e6a31d67475989e80534147060f1bc1b3f4b74e2f39da776f02d
MD5 952a069a441bb7257cb8564962c35af6
BLAKE2b-256 e2e56362dac4972068771aaf77c65667d76e5ab9736d4d4b527416404ba33047

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