Skip to main content

A PyPI packages that supports all the necessary error codes, validation exception, common exceptions of a webservice. This PyPI package includes a method that establishes the connection to your firebase account and provides logging methods.

Project description

Webservice Stash

A PyPI packages that supports all the necessary error codes, validation exception, common exceptions of a webservice. This PyPI package includes a method that establishes the connection to your firebase account.

Installation

Run the following to install:

pip install stash-service

Usage

Connect to Firestore with key

A connection can be established easily with your Firestore account. This method receives two mandatory parameters. The first string parameters receives your collection name of the Firestore database and the second string or dictionary parameter will receive your firestore account's secret key.

from stash_service import connect_firestore_with_key

db_reference = connect_firestore_with_key(collection_name, firestore_secret_key)

Response codes description

HTTP response status codes indicate whether a specific HTTP request has been successfully completed.

All HTTP response status codes are separated into five classes or categories. The first digit of the status code defines the class of response, while the last two digits do not have any classifying or categorization role.

1xx informational response – the request was received, continuing process.
   An informational response indicates that the request was received and understood. 
2xx successful – the request was successfully received, understood, and accepted.
   This class of status codes indicates the action requested by the client was received, understood, and accepted.
3xx redirection – further action needs to be taken in order to complete the request.
   This class of status code indicates the client must take additional action to complete the request. 
4xx client error – the request contains bad syntax or cannot be fulfilled.
   This class of status code is intended for situations in which the error seems to have been caused by the client.
5xx server error – the server failed to fulfil an apparently valid request.
   Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has encountered an error or is otherwise incapable of performing the request.

App_Exception code description

The App_Exception is a class which will inherit the properties of Class Exception. The method init will check your program with the conditions and check whether it contains error or not. If the condition satisfies then the method "response" will be called which will give the required exception(error description).

The function "get_env" will retrieve values of your environment variables of your program.

MIT Licensed - 2021 : Britsa - britsa.tech@gmail.com

Contributors: Maria Irudaya Regilan J, Pavithra K, Venkateshwar S, D Vidhyalakshmi


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

stash_service-1.1.3.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

stash_service-1.1.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file stash_service-1.1.3.tar.gz.

File metadata

  • Download URL: stash_service-1.1.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.6.8

File hashes

Hashes for stash_service-1.1.3.tar.gz
Algorithm Hash digest
SHA256 f85a541598bb705356c5ee5db7d21629e7254038ebcd78a83d1a4d3680df48e5
MD5 ce845ae52b422ece32c794f11c6307c5
BLAKE2b-256 09f23b394ae3ecef5ebca7abe83b015b983123f8d68acb2d03e348e219736b85

See more details on using hashes here.

File details

Details for the file stash_service-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: stash_service-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.6.8

File hashes

Hashes for stash_service-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f84ed51ba21711e45501ecafd25ca814be677cd53fbab6b3dd33a4aa764829ba
MD5 46fabb72e6f5564bbdb7fd9aaf42f60c
BLAKE2b-256 57a06c0dda0770b2b0c6c29ca45616270e2d09d3e663b20d130911f195a4ac01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page