Skip to main content

Python wrapper around the dotloop API.

Project description

dotloop-python

Python wrapper around the dotloop API.

Quick Start

Authenticate

Start by getting access and refresh tokens.

from dotloop import Authenticate

auth = Authenticate('dotloop-client-id', 'dotloop-client-secret')
url = auth.url_for_authentication('https://example.com/redirect/')

...
# code is received
with auth:
    response = auth.acquire_access_and_refresh_tokens(code, 'https://example.com/redirect/')
    # response is a dictionary:
    # {
    #   "access_token": "...",
    #   "token_type": "Bearer",
    #   "refresh_token": "...",
    #   "expires_in": ...,
    #   "scope": "..."
    # }

Client

Then use the access token acquired to create a Client object.

access_token = response['access_token']
client = Client(access_token)

From the Client object, you can now access dotloop data.

For example, get data about all profiles

client.profile.get()  # -> Dict

or get data about a specific profile

client.profile(<profile_id>).get()

or get all loops associated with a profile

client.profile(<profile_id>).loop.get()

or get all folders in a specific loop

client.profile(<profile_id>).loop(<loop_id>).folder.get()

or update a participant on a specific loop

client.profile(<profile_id>).loop(<loop_id>).participant(<participant_id>).patch(email='newemail@example.com')

Design Philosophy

All items accessible in the dotloop API follow a hierarchical structure (i.e. profiles have loops which have folders which have documents) as represented like this:

  • Account
  • Contact
  • LoopIt
  • Profile
    • LoopTemplate
    • Loop
      • Activity
      • Participant
      • Detail
      • TaskList
        • Task
      • Folder
        • Document

The design of this wrapper was intended to emulate that while providing idiomatic ways of quickly accessing data. Endpoints and their HTTP methods are easily translated to python code.

Accessing

PATCH /profile/1/loop/1/folder/1

with data

{
  "name": "Disclosures (renamed)"
}

translates seamlessly to

client.profile(1).loop(1).folder(1).patch(name='Disclosures (renamed)')

Note: if data keys ever have spaces then those keys can be included by unpacking a dictionary e.g.

client.profile(1).loop(1).detail.patch(**{'Property Information': {...}})

Inspiration was taken from dotloop-ruby and sendgrid-python.

Links

dotloop API documentation

To-Do

  • Account
    • .get
  • Activity
    • .get
  • Contact
    • .delete
    • .get
    • .patch
    • .post
  • Detail
    • .get
    • .patch
  • Document
    • .get
    • .post
  • Folder
    • .get
    • .patch
    • .post
  • Loop
    • .get
    • .patch
    • .post
  • LoopIt
    • .post
  • LoopTemplate
    • .get
  • Participant
    • .delete
    • .get
    • .patch
    • .post
  • Profile
    • .get
    • .patch
    • .post
  • Task
    • .get
  • TaskList
    • .get

Disclaimer

I do not work for dotloop.

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

dotloop-python-0.0.6.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

dotloop_python-0.0.6-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file dotloop-python-0.0.6.tar.gz.

File metadata

  • Download URL: dotloop-python-0.0.6.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for dotloop-python-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8a1d8c0af088a77b10572f76ded89ca87adf8999f2e673b1f098b4471e0e2a97
MD5 7694ac3640e3e47c225d8c0edcb53369
BLAKE2b-256 3452169b263c6586718e474ebe1973a75e3fec7c83c8aaee91d4ea67a776f8bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dotloop_python-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for dotloop_python-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1e8cd5af7ae226c9d32d6f7bed9480789221e87bf1bab83cd82119d64b7aead8
MD5 2fba40bf62631aa52dc6a4ce7da69ef3
BLAKE2b-256 26f85ad2851bfa2349caa58000073f1fe02375d0fe56784bdf5be2ae1c771ab3

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