Skip to main content

Simple class that helps dealing with smarsheet api

Project description

smartsheet-helper

Simple class that helps dealing with smarsheet api, like dealing with columin ids and types

it uses environment variables for keys and ids:

SMARTSHEET_SHEET_ID=your_sheet_id SMARTSHEET_ACCESS_TOKEN=your_secret_access_token

Danjgo webhook handler example

''' from django.views.decorators.http import require_http_methods from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse

@require_http_methods(["POST"]) @csrf_exempt def handleWebhook(request): #handle challenge if("Smartsheet-Hook-Challenge" in request.headers): res = {"smartsheetHookResponse": request.headers["Smartsheet-Hook-Challenge"]} return JsonResponse(res) data = json.loads(request.body) # data = { # "nonce":"6939c036-b01b-1111-2222-4e085ef1a5a0", # "timestamp":"2023-11-05T13:07:26.115+00:00", # "webhookId":6847500251111108, # "scope":"sheet", # "scopeObjectId":6817504622273380, # "events":[ # { # "objectType":"cell", # "eventType":"updated", # "rowId":5849931133364004, # "columnId":3996433355807364, # "userId":8583582333729092, # "timestamp":"2023-11-05T13:07:20.000+00:00" # } # ] # }

# do something

return JsonResponse({"result": "success"})

'''

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

smartsheet_helper-0.0.3.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

smartsheet_helper-0.0.3-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smartsheet_helper-0.0.3.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for smartsheet_helper-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c7df2053fd096a016731c5cdcc6018bf79f5c933c0fab5584aafe44d1d613fae
MD5 2fe805aaf41ffc75843c068056523c2b
BLAKE2b-256 da121e2e02ff28872f74b9c82d402c4c0b158ceac1981e9d7542797fff28e8ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for smartsheet_helper-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 65b3157840d28dec3a6a2c257a7bc17d16a0b2dc257c3b20e918cb1233c4335e
MD5 21faac7916036c37b7400cd14bf49c21
BLAKE2b-256 9ef406034aebaa3908ce768e09581d14917d24dbfec25520a10d4cb8d7832f93

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