Skip to main content

Snowflake Wokspace Extractor is a Python package that provides a simple way to extract and analyze data from Snowflake workspaces. It allows users to retrieve metadata, query history, and other relevant information from their Snowflake workspaces, enabling better understanding and management of their data environment.

Project description

Workspace Estimator (WE)

Workspace Estimator allows you to analyze information about your workspace without giving direct access to your system.

Disclaimer

This application is not part of the Snowflake Service and is governed by the terms in LICENSE, unless expressly agreed to in writing. You use this application at your own risk, and Snowflake has no obligation to support your use of this application.

License

These scripts are licensed under the Apache license.

Requirement

  • Account with admin privilege in the workspace.

How to

Please follow instructions in the step by step guide.

Building and Publishing to PyPI

This guide explains how to build your Python package using Hatch and publish it to PyPI using twine.

Prerequisites

Ensure you have the required tools installed:

pip install hatch twine

Step 1: Build the Package

Using Hatch (recommended)

# Clean any previous builds
rm -rf dist/ build/ *.egg-info/

# Build the package using Hatch
hatch build

After building, you should see the generated files in the dist/ directory:

  • workspace_extractor-x.y.z.tar.gz (source distribution)
  • workspace_extractor-x.y.z-py3-none-any.whl (wheel distribution)

Step 2: Test Your Build

Before uploading to PyPI, test your package locally:

# Install your package locally
pip install dist/your-package-name-version.tar.gz

# Or install from wheel
pip install dist/your-package-name-version-py3-none-any.whl

Step 3: Upload to PyPI

Option A: Upload to Test PyPI (Recommended First)

  1. Upload to Test PyPI:
twine upload --repository testpypi dist/*
  1. Test installation from Test PyPI:
pip install --index-url https://test.pypi.org/simple/ your-package-name

Option B: Upload to Production PyPI

  1. Upload to PyPI:
twine upload dist/*

Step 4: Authentication

Using API Tokens (Recommended)

After the twine upload dist/* command is executed it will ask for a password (API Token)

Complete Workflow Example

# 1. Clean previous builds
rm -rf dist/ build/ *.egg-info/

# 2. Build the package using Hatch
hatch build

# 3. Check the build
twine check dist/*

# 4. Upload to Test PyPI first
twine upload --repository testpypi dist/*

# 5. Test installation
pip install --index-url https://test.pypi.org/simple/ your-package-name

# 6. If everything works, upload to production PyPI
twine upload dist/*

Troubleshooting

Common Issues

  • "Package already exists": You cannot overwrite existing versions. Increment your version number in pyproject.toml or setup.py.
  • Authentication failed: Check your API token or credentials.
  • File not found: Ensure you've built the package first with hatch build.

Checking Your Build

# Verify your package contents
twine check dist/*

# List contents of your wheel
unzip -l dist/your-package-name-version-py3-none-any.whl

Version Management

Always increment your version number for new releases in __version__.py:

  • Patch version: 1.0.01.0.1 (bug fixes)
  • Minor version: 1.0.01.1.0 (new features)
  • Major version: 1.0.02.0.0 (breaking changes)

Note: With Hatch, the version is managed in the __version__.py file as configured in pyproject.toml.

Security Best Practices

  1. Use API tokens instead of username/password
  2. Limit token scope to specific projects when possible
  3. Keep tokens secure - don't commit them to version control
  4. Use Test PyPI first to avoid mistakes on production

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

snow_workspace_extractor-0.1.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snow_workspace_extractor-0.1.1-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file snow_workspace_extractor-0.1.1.tar.gz.

File metadata

File hashes

Hashes for snow_workspace_extractor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6dcf9116410b02719829bc24140be31e49b62faa8b3d44558bdf722475d8e1f5
MD5 6aa4fe81ee3d47b71d2165b2360be64b
BLAKE2b-256 9b9a8e9b9839579bfab93059e0abb59c7839042e16a1eecd6a6e161ea22728fe

See more details on using hashes here.

File details

Details for the file snow_workspace_extractor-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for snow_workspace_extractor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37f539c15411a57637adc03e37adff8b9d5d4b962fb605145ff88ddb6e5764d5
MD5 ac1a0ca826e9ab9bcc3cb472f695479b
BLAKE2b-256 e6af29db55585b1113cc2e03d79f761df03b56470ad5ff7c2c333a5e0cbdf58d

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