Utilities
Cloud Storage
The Parsons cloud storage utility was created to interact with APIs that require access to files to run an asynchronous process.
The cloud storage utility is currently being utilitized primarily by the NGPVAN class
methods such as upload_scores()
and
upload_saved_list()
.
These methods have arguments specific their method, but all also contain the following cloud storage arguments:
url_type
- The type of cloud storage to utilize. CurrentlyS3
orGCS
.**url_kwargs
- These are arguments specific to the cloud storage type in order to initialize. They are listed below based on the url type.
The file will then be converted to a CSV, compressed and posted to the cloud storage. A presigned url will be generated and active by default for 60 minutes, but you can adjust the time.
Amazon S3
Below are the required and optional arguments utilizing Amazon S3 as the cloud storage service:
Argument |
Required |
Description |
---|---|---|
|
Yes |
The S3 bucket to post the file |
|
No |
Required if |
|
No |
Required if |
|
No |
Defaults is 60 minutes. |
Google Cloud Storage
Below are the required and optional arguments utilizing Google Cloud Storage as the cloud storage service:
Argument |
Required |
Description |
---|---|---|
|
Yes |
The S3 bucket to post the file |
|
No |
Required if |
|
No |
Defaults is 60 minutes. |