Skip to main content

A handful of dis-snek scales that I want to use in most of my bots.

Project description

dis-taipan PyPI

50% Dis-Snek features that are either too undercooked for merging into the library proper 50% "application specific" common code I want to use in most of my bots, but don't fit the philosophy of dis-snek itself.

A taipan is a dangerous australian snake. I thought it was mildly amusing.

pip install dis-taipan

Compatibility promises

Where possible, I avoid breaking changes. While internals may change, the public interface will not.

Any features that are upstreamed and integrated into snek proper will be aliased, and still be accessible under the dis_taipan namespace.

I will bump the major version of taipan if I make breaking changes, or if I have to bump the minimum supported Snek version.

Ready-to-Use Scales

dis_taipan.sentry

Sets up a sentry.io hooks, intended to be as simple as possible.

To install, either set an environment variable called SENTRY_TOKEN (I recommend using dotenv), or put a string in the sentry_token attribute of your bot class.

Then call bot.load_extension('dis_taipan.sentry') to initialize the logger.

dis_taipan.updater

Automatic updater. Makes the following assumptions:

  • You deploy using git, and the .git folder exists in production
  • You have some kind of health check that will reboot the bot when it shuts down.

To install, call bot.load_extension('dis_taipan.updater'). It'll do its magic every five minutes. There is no configuration.

Code Quality things:

Protocols

Protocols are essentially the duck-typing equivelent of ABCs. Think of them like Interfaces from C-like languages.

SendableContext is a protocol that mimics a Context with SendMixin. Useful when typing error handlers.

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

dis-taipan-0.2.9.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

dis_taipan-0.2.9-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file dis-taipan-0.2.9.tar.gz.

File metadata

  • Download URL: dis-taipan-0.2.9.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for dis-taipan-0.2.9.tar.gz
Algorithm Hash digest
SHA256 8d5341690a4c113116bda14dbeb479aabc6fbf36fe64cbf27fd3db16babdfe85
MD5 607c72446a952d0551c9c95e969f3e1f
BLAKE2b-256 57f07c39138c5f3f2ae4aad92c68be0073751f6f9efe585eba68d56b4d02525c

See more details on using hashes here.

File details

Details for the file dis_taipan-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: dis_taipan-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for dis_taipan-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e0590871b33963205a3148acee54b61ce21ddd9074ba99b08b970fd044de22db
MD5 e1c5c12b6d729a50167be07a0651a18d
BLAKE2b-256 54fba6eaa0c0e67b257a61588ef5dc4545d481fa70e54b18771f4d52122b8393

See more details on using hashes here.

Supported by

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