Skip to main content

Dependency less classes and functions for trame

Project description

trame-common: common code for any trame package

Trame is rapidly evolving and having a dependency-less package to provide helper functions and classes across trame's eco-system is important for its future health. Initially some of those classes were created inside trame-client, trame-server or even trame, but we reached a point where some of those should become even more mainstream so they could easily be used on server, client, widget and more. That is where trame-common comes to play by providing a central location that any package can depend on. By default, trame remain the meta package that will impose some minimum version on trame-common, trame-client and trame-server and expose via some common namespace various pieces of those 3 dependencies. But if you need any piece of trame-common, feel free to depend on it.

Trame-common is not meant to be installed by itself, but instead be used by any trame package that may require one of its function or helper class. While some of the module may require extra dependency, we are not listing them in this package purposely but the using code, should properly describe such dependency.

Content

trame-common is composed of several packages to split the current set of classes and function in meaningful groups.

  • trame_common.assets: Contains anything related to local and remote file including possible associated mime types.
  • trame_common.decorators: Contains all decorators for functions, classes and methods.
  • trame_common.exec: Contains helpers for handling code execution (i.e. async, throttle, debounce, thread, process).
  • trame_common.obj: Contains helpers for common trame objects (i.e. Component, App, Widget, Singleton)
  • trame_common.utils: Contains utility functions.

License

trame-common is made available under the Apache License, Version 2.0. For more details, see LICENSE.

Development steps

  • Clone the repository using git clone
  • Install pre-commit via pip install pre-commit or pip install -e ".[dev]"
  • Run pre-commit install to set up pre-commit hooks
  • Run pre-commit install --hook-type commit-msg to register commit-msg hook
  • Make changes to the code, and commit your changes to a separate branch. Use conventional commit messages.
  • Create a fork of the repository on GitHub
  • Push your branch to your fork, and open a pull request

Tips

  • When first creating a new project, it is helpful to run pre-commit run --all-files to ensure all files pass the pre-commit checks.
  • A quick way to fix ruff issues is by installing ruff (pip install ruff) and running the ruff check --fix . or ruff format command at the root of your repository.
  • A quick way to fix codespell issues is by installing codespell (pip install codespell) and running the codespell -w command at the root of your directory.
  • The .codespellrc file <https://github.com/codespell-project/codespell#using-a-config-file>_ can be used fix any other codespell issues, such as ignoring certain files, directories, words, or regular expressions.

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

trame_common-1.2.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

trame_common-1.2.0-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file trame_common-1.2.0.tar.gz.

File metadata

  • Download URL: trame_common-1.2.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trame_common-1.2.0.tar.gz
Algorithm Hash digest
SHA256 bf06c1cd4183da4e1e1e6236fb44e9d037285f0b193aee93d4d3b8a94683a5e5
MD5 8852d59db41596f0f84eb23f63bf37cf
BLAKE2b-256 3a5352577b28fce71ac182d113261c2289fc33ec8e06ad8b3bb52b3ef6cded86

See more details on using hashes here.

Provenance

The following attestation bundles were made for trame_common-1.2.0.tar.gz:

Publisher: test_and_release.yml on Kitware/trame-common

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trame_common-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: trame_common-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trame_common-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d477d0796367b37da035b4ac8581c9ad2ded926f64fcb84c9741616bbe8f738e
MD5 2d1d22c32c68df68e6275e47f85cbf33
BLAKE2b-256 521337b2788c558e56450b8ef2c2ca15f5e34194187395f34f4dc4226c6bcd1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for trame_common-1.2.0-py3-none-any.whl:

Publisher: test_and_release.yml on Kitware/trame-common

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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