Skip to content

Granulate shared Python utilities

License

AGPL-3.0, BSD-3-Clause licenses found

Licenses found

AGPL-3.0
LICENSE.md
BSD-3-Clause
LICENSE.bsd3
Notifications You must be signed in to change notification settings

pfilipko1/granulate-utils

 
 

Granulate's shared Python utilities

Supports Python 3.8+.

Testing

pytest tests

Exposing Exceptions

Since exceptions are unchecked in python, as a general rule 3rd party exceptions should not be "part of the API". The reasoning is that if we do something like vendor the dependency or change to a different library, we will break all code that caught such exceptions. Moreover - the break will be "silent" and cannot be caught by any linting or typing tools. So for every 3rd party exception that someone might wish to catch - the exception type should be exposed through granulate-utils, either by catching the 3rd party exception and re-raising our own exception or by re-exporting the 3rd party exception in the relevant module.

There are two exceptions for this rule for libraries that are in very common use and in the author's opinon should be added to the standard library:

  1. requests
  2. psutil We treat those libraries as "standard library" in this regard.

About

Granulate shared Python utilities

Resources

License

AGPL-3.0, BSD-3-Clause licenses found

Licenses found

AGPL-3.0
LICENSE.md
BSD-3-Clause
LICENSE.bsd3

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Shell 0.6%