Skip to main content

kraken-common

The kraken-common package is the shared utility namespace for the Kraken build system and the Kraken wrapper CLI. It contains various generic utilities, as well as the tools for loading the metadata of a Kraken project.

Aside from general utilities that are used by one, the other or both, this package also implements the shared logic for executing Kraken Python and BuildDSL build scripts and retrieving its metadata.

Script runners

The following types of Kraken script runners are currently available via the kraken.common package:

  • PythonScriptRunner: Matches a kraken.py or .kraken.py file and runs it as a pure Python script.
  • BuildDslScriptRunner: Matches a kraken.build or .kraken.build file and runs it as a builddsl script, with the buildscript() function being available by default.

Buildscript metadata

A Kraken project contains at least one .kraken.py file (build script) and maybe a .kraken.lock file (lock file). The build script at the root of a project may contain hints for the Kraken wrapper CLI to be able to correctly bootstrap an environment that contains the Kraken build system.

PythonBuildDSL
from kraken.common import buildscript

buildscript(
    requirements=["kraken-std ^0.4.16"],
)
buildscript {
    requires "kraken-std ^0.4.16"
}

The way that this works is that the buildscript() function raises an exception that aborts the execution of the build script before the rest of the script is executed, and the exception contains the metadata. When the build script is executed by the Kraken build system instead, the function does nothing.

The API to capture the data passed to a call to the buildscript() function is as follows:

from kraken.common import BuildscriptMetadata

with BuildscriptMetadata.capture() as metadata_future:
    ...

metadata = metadata_future.result()

Release files for kraken-common 0.31.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kraken-common 0.31.7
File Size Uploaded
kraken_common-0.31.7.tar.gz 25.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kraken-common 0.31.7
File Interpreter ABI Platform
kraken_common-0.31.7-py3-none-any.whl Python 3 none any Details

Total release size:58.3 kB

Release files / kraken_common-0.31.7.tar.gz

Download URL kraken_common-0.31.7.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6e2c3acf02797533d1ff45af0214c14059fdf3bbd24ec2c725d61df8174bfc48
BLAKE2b-256 checksum
How to use checksums
8fcd3d815db492b098a1a6bc62d49e66450ecbcde3767ddef7ba97355bdfccce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.30.0 requests-toolbelt/1.0.0 urllib3/2.0.2 tqdm/4.65.0 importlib-metadata/6.6.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.2

Release files / kraken_common-0.31.7-py3-none-any.whl

Download URL kraken_common-0.31.7-py3-none-any.whl
Size 33.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc224d5886536a2996a6306f12f366114511cf10a2c8404dc693f57ddc2fb4a0
BLAKE2b-256 checksum
How to use checksums
bc33cd7c3336e15cc49c69fcf33fd0800a6d9dc99828c68dc9a50c23a6e67cda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.30.0 requests-toolbelt/1.0.0 urllib3/2.0.2 tqdm/4.65.0 importlib-metadata/6.6.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.31.7 This release

2 release files

0.31.6

2 release files

0.31.5

2 release files

0.31.4

2 release files

0.31.3

2 release files

0.31.1

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.28.4

2 release files

0.28.3

2 release files

0.28.2

2 release files

0.28.1

2 release files

0.27.5

2 release files

0.27.4

2 release files

0.27.3

2 release files

0.27.2

2 release files

0.27.1

2 release files

0.27.0

2 release files

0.26.1

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.24.3

2 release files

0.24.2

2 release files

0.24.1

2 release files

0.24.0

2 release files

0.20.4

2 release files

0.20.3

2 release files

0.20.2

2 release files

0.20.1

2 release files

0.20.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page