Skip to main content

Contributor Covenant

SwissKnife

Hey! Welcome to SwissKnife, a set of tools and functionalities built by the Data Engineering team at @uDATech.

This library is born from an urge of having a common repo to gather some functions that are widely used accross our tools.

Suggestions and contributions are more than welcome, always respecting our Code of Conduct.

Installation guide

This repo is available to download via PyPI and it has different sets of functionalities that can be independently installed:

  • Basic set:

    • Packages included:
      • info
    pip install UDASwissKnife
    
  • Extended set:

    • Packages included:
      • avro
      • gcloud
    pip install UDASwissKnife[avro,gcloud]
    
  • Complete set:

    • Includes both Basic and Extended sets
    pip install UDASwissKnife[all]
    

Using the modules

info

The main goal of this module is to identify the environment in which we are currently working. This is done thanks to an environment variable $ENV which contains the name of the working environment. The accepted case insensitive values of this working environment are:

The object SwissKnife.info.CURRENT_ENVIRONMENT, which is of type ExecutionEnvironment, an enum that contains the following entries:

  • PRO
  • PRE
  • TEST
  • DEV (default)

Then, it's possible to know the working environment using a set of methods which return a boolean indicating whether we are in that environment or not:

  • is_pro()
  • is_pre()
  • is_test()
  • is_dev()

It's also possible to obtain the working environment using object SwissKnife.info.CURRENT_ENVIRONMENT.

Why is there a Dockerfile?

The one and only purpose of the Dockerfile is to execute the tests defined in the project. By building and running the Docker image, tests results will be printed in the terminal. If it's needed to save the result in a file, run:

sudo docker run swissknife:latest > nosetests.xml

Metadata

Release files for udaswissknife 0.12.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 udaswissknife 0.12.0
File Size Uploaded
UDASwissKnife-0.12.0.tar.gz 14.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for udaswissknife 0.12.0
File Interpreter ABI Platform
UDASwissKnife-0.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.4 kB

Release files / UDASwissKnife-0.12.0.tar.gz

Download URL UDASwissKnife-0.12.0.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7bd2e7c666de0b8ef8cd5ea873ed21543e77dc31d35fa9d3fbecd6ad6267edd5
BLAKE2b-256 checksum
How to use checksums
d48670c83904fb41eb922bacb920014c91b8e2643eada003d069bd0e98ca6bd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.7.9 Linux/5.8.0-48-generic

Release files / UDASwissKnife-0.12.0-py3-none-any.whl

Download URL UDASwissKnife-0.12.0-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47a4df5925f5c49d2a6e1e554c9092807aa4a3c2a928f6f46be894a190f73edb
BLAKE2b-256 checksum
How to use checksums
4b4c71518e6c0cb2448d3d6500bf6169e28a90fc7d8538158f9dffc2c3752faf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.7.9 Linux/5.8.0-48-generic

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.10.0

1 release file

0.9.0

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.1

1 release file

0.7.0

2 release files

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

2 release files

0.1.1

2 release files

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