Skip to main content

A library for generating the path to write files to in cloud storage

Project description

Path generator for dataplatform files in cloud storage

This library generates the path to write files to in cloud storage, partitioned into the prefix, source, optionally type, and then finally the day. Arguments:

  • prefix: "the prefix of the cloud storage location of your files, usually the top level bucket
  • source: the type of files to output.
  • date: the execution date in isoformat
  • type (Optional): a subset of source, if the source has multiples types

Example usage:

from pathgenerator import path

output_path = path.generate_path('gs://dataplatform-raw', 'salesforce', "2022-03-11T12:12:12+00:00", "account")

Output

gs://dataplatform-raw/source=salesforce/type=account/year=2022/month=3/day=11

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

dataplatform-path-generator-0.0.2.tar.gz (1.9 kB view details)

Uploaded Source

File details

Details for the file dataplatform-path-generator-0.0.2.tar.gz.

File metadata

  • Download URL: dataplatform-path-generator-0.0.2.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.0 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.8.9

File hashes

Hashes for dataplatform-path-generator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2f3a0c01018a1d5f4f3d056e21a8e5cc7a7038e0ba399f167656677145453327
MD5 0a083e0e128070168ad2a471ac12df61
BLAKE2b-256 f759b85bb5e26f66a4ede5581bf2ad84210459ae0a9916fae5c62af85023f79c

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