Skip to main content

Package with utils

Project description

Vavacars

Vavacars utils library.

Installation

To use the library, simply install it with pip or add into requirements.txt

python3 -m pip install --upgrade vavacars_data_utils

Usage

The library includes a series of common utilities we are using in Vavacars

SIQ

  • Wrapper to get quotations from SIQ
  • Helper_v2 adds querying Redis Cache before asking SmartIQ

Camunda DMN

  • Wrapper to query Camunda DMN for initial offer (strategies)

SQL

  • Wrapper to run querys against a MySQL/SQL Server
  • SQL Server requires Microsfot OBDC Driver to be installed, for Ubuntu 20.04 use the following comamnds:
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | tee /etc/apt/sources.list.d/msprod.list
apt-get update && ACCEPT_EULA=y DEBIAN_FRONTEND=noninteractive apt-get install -y mssql-tools unixodbc-dev && pip install pymssql

Azure Helper

  • Wrapper to around Azure ML SDK for registering and reploying models

BigQuery Helper

  • Wrapper to run queries against BigQuery

SalesForce Helper

  • Wrapper to retrieve data from SalesForce

Email

  • Wrapper to send emails via Email Communication Resource in Azure

Turkey specifics:

  • turkish_to_datetime(str): Date conversion from turkish dates

Other:

  • get_best_match(value, list_values): Find closest string in a list (used for bodytypes, trimlevels, ...)
  • deep_get(dictionary, nested_keyss)
  • return_on_failure(f,v): Run function f and return v if f yields any exception in other case it will retun f() result
  • extract_json_objects(t): Look Json objects in the text t

Building

First, update at least the version number in setup.cfg

Next, install build package in your environment:

python3 -m pip install --upgrade build

Then you can run python3 -m build to generate the distribution, this will generate the distribution files under dist/ folder. Check the folder as it may contain the files from the previous build.

Publishing

To publish it we are using twine, so first install it:

python3 -m pip install --upgrade twine

And then you can publish it running (from this folder), it will ask you for credentials in the registry:

twine upload -r pypi dist/*

For more details, check: https://packaging.python.org/en/latest/tutorials/packaging-projects/

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vavacars_data_utils-1.5.12.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

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

vavacars_data_utils-1.5.12-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file vavacars_data_utils-1.5.12.tar.gz.

File metadata

  • Download URL: vavacars_data_utils-1.5.12.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for vavacars_data_utils-1.5.12.tar.gz
Algorithm Hash digest
SHA256 a2e413221297e45013dbd14696f105d481f98d7334a671aba5b00aff963b6aa5
MD5 8e95d41df28f21a32b17e8f98be638fe
BLAKE2b-256 91aeed92003241aeaaafffb0cbf46d4009018fe9ff0315a0d004db6156213733

See more details on using hashes here.

File details

Details for the file vavacars_data_utils-1.5.12-py3-none-any.whl.

File metadata

File hashes

Hashes for vavacars_data_utils-1.5.12-py3-none-any.whl
Algorithm Hash digest
SHA256 4a6f9d75dd5306c9a20cb1ab7373b907d09d18be84f1cade4cea9177cc53ca5c
MD5 81eae7176b5ec5a45beb08250023c5be
BLAKE2b-256 0541bd9dc6423396dd1c52ba4caa7b8df0758d8f1d756422f8c36d8fe500177a

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