Skip to main content

webspinner

PyPI

Python utilities for working with data source types used by the dsgrid project (i.e., AWS, PostgreSQL, and .parquet)

Install | Configure | Uninstall

Install

pip install webspinner

or

pip install git+ssh://git@github.com/dsgrid/webspinner.git@v1.1.0

or

pip install git+https://github.com/dsgrid/webspinner.git@master

To get dependencies required for certain types of resources, add extras as in:

pip install webspinner[pgres]
pip install webspinner[aws]
pip install webspinner[parquet]
pip install webspinner[pgres,aws,parquet]

Configure

webspinner provides code in support of accessing various dsgrid data sources. That said, you may only need to access one or two data sources for your particular project. Please configure access to the resources you need.

PostgreSQL | AWS | .parquet

PosgreSQL

Dependencies

pip install pgpasslib psycopg2

Install pgAdmin or another PostgreSQL client. Then identify or create your pgpass file. On Mac and Linux, the file to edit or create is ~/.pgpass. On Windows it is %APPDATA%/Roaming/postgresql/pgpass.conf, where %APPDATA% is the AppData subdirectory under your user profile (i.e., C:/Users/$USER/AppData). If the file does not yet exist, simply create a new text file named pgpass.conf. Once the file exists, add the lines like:

POSTGRES_SERVER_ADDRESS:*:*:$USER:YOUR_PASSWORD

replacing POSTGRES_SERVER_ADDRESS with the PostgreSQL server to connect to, $USER with your actual username, and YOUR_GISPGDB_PASSWORD with your actual password. The dsgrid team typically connects to 10.20.5.28 or its alias gds_edit.nrel.gov.

On Mac and Linux be sure to set the permissions to

chmod 600 ~/.pgpass

If the permissions are too permissive, your run may not start.

Configuration file arguments

Project-specific defaults can be stored in a text file, e.g., webspinner.config or config.ini with a [PGRES] section and any or all of the following arguments:

[PGRES]
user = your_user_name
dbase = database_name
host = host_address
port = port_number

The defaults can then be loaded in at any time (e.g., at the top of a script or a notebook) by passing the configuration filepath into the webspinner.configure function.

AWS

Dependencies

pip install pyathena awscli

Set up your AWS access credentials by issuing the following command in the terminal. (FYI there are other ways to set up your credentials if you're interested.)

>> aws configure
AWS Access Key ID [None]: <your key>
AWS Secret Access Key [None]: <your secret key>
Default region name [None]: us-west-2
Default output format [None]: json

Configuration file arguments

Project-specific defaults can be stored in a text file, e.g., webspinner.config or config.ini with an [AWS] section and any or all of the following arguments:

[AWS]
s3_staging_dir = data_staging_dir_on_s3
region_name = aws_region_name
schema_name = aws_database_schema_name
work_group = aws_work_group_name

The defaults can then be loaded in at any time (e.g., at the top of a script or a notebook) by passing the configuration filepath into the webspinner.configure function.

.parquet

If you plan to work with .parquet files, also install pyarrow.

pip install pyarrow

Uninstall

pip uninstall webspinner

Metadata

Release files for webspinner 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webspinner 1.1.0
File Size Uploaded Provenance
webspinner-1.1.0.tar.gz 7.5 kB Without provenance Details

Release files / webspinner-1.1.0.tar.gz

Download URL webspinner-1.1.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2605362214ee2d639f72c6bcf1e554cdde3065631ea9712b6509e2ff94eb105f
BLAKE2b-256 checksum
How to use checksums
ea9b4092ca97ecf7a7f55587c76597bd4031903587b5a017d489659c58c20e08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/54.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4

Security for webspinner 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page