Package Search Help

You can use boolean logic (e.g. AND/OR/NOT) for complex search queries. For more help and examples, see the search documentation.

Search by package name:
my-package (implicit)
name:my-package (explicit)

Search by package filename:
filename:my-package.ext 

Search by package tag:
tag:latest 

Search by package version:
version:1.0.0  prerelease:true (prereleases)
prerelease:false (no prereleases)

Search by package architecture:
architecture:x86_64 

Search by package distribution:
distribution:el 

Search by package license:
license:MIT 

Search by package format:
format:deb 

Search by package status:
status:in_progress 

Search by package file checksum:
checksum:5afba 

Search by package security status:
severity:critical 

Search by package vulnerabilities:
vulnerabilities:>1 
vulnerabilities:<1000 

Search by # of package downloads:
downloads:>8 
downloads:<100 

Search by package type:
type:binary 
type:source 

Search by package size (bytes):
size:>50000 
size:<10000 

Search by dependency name/version:
dependency:log4j 
dependency:log4j=1.0.0 
dependency:log4j>1.0.0 

Search by uploaded date:
uploaded:>"1 day ago" 
uploaded:<"August 14, 2022 EST" 

Search by entitlement token (identifier):
entitlement:3lKPVJPosCsY 

Search by policy violation:
policy_violated:true
deny_policy_violated:true
license_policy_violated:true
vulnerability_policy_violated:true

Search by repository:
repository:repo-name

Search by last download date:
last_downloaded:<"30 days ago" 
last_downloaded:>"August 14, 2022 EST" 

Search queries for all Debian-specific (and related) package types

Search by component:
deb_component:unstable

Search queries for all Maven-specific (and related) package types

Search by group ID:
maven_group_id:org.apache

Search queries for all Docker-specific (and related) package types

Search by image digest:
docker_image_digest:sha256:7c5..6d4
(full hashref only)

Search by layer digest:
docker_layer_digest:sha256:4c4..ae4
(full hashref only)

Search queries for all Generic-specific package types

Search by file path:
generic_filepath:path/to/file.txt

Search by directory:
generic_directory:path/to

Field type modifiers (depending on the type, you can influence behaviour)

For all queries, you can use:
~foo for negation

For string queries, you can use:
^foo to anchor to start of term
foo$ to anchor to end of term
foo*bar for fuzzy matching

For number/date or version queries, you can use:
>foo for values greater than
>=foo for values greater / equal
<foo for values less than
<=foo for values less / equal

Need a secure and centralised artifact repository to deliver Alpine, Cargo, CocoaPods, Composer, Conan, Conda, CRAN, Dart, Debian, Docker, Generic, Go, Helm, Hex, HuggingFace, LuaRocks, Maven, MCP, npm, NuGet, P2, Python, RedHat, Ruby, Swift, Terraform, Vagrant, VSX, Raw & More packages?

Cloudsmith is the new standard in Package / Artifact Management and Software Distribution.

With support for all major package formats, you can trust us to manage your software supply chain.

Start My Free Trial

Python logo bx-py-utils  24

One-liner (summary)

Various Python / Django utility functions

Description

# Boxine - bx_py_utils

Various Python / Django utility functions

## Quickstart

`bash pip install bx_py_utils `

## Existing stuff

Here only a simple list about existing utilities. Please take a look into the sources and tests for deeper informations.

### models utilities

  • approve_workflow - Base model/admin/form classes to implement a model with draft/approve versions workflow
  • manipulate.create_or_update() - Similar to django's create_or_update() with benefits
  • timetracking.TimetrackingBaseModel() - Base model with "create" and "last update" date time

### data types

### test utilities

  • datetime.MockDatetimeGenerator() - Mock django timezone.now() with generic time stamps
  • datetime.parse_dt() - Handy datetime.strptime() convert
  • html_assertion.HtmlAssertionMixin - Unittest mixin class with usefull assertments around Django test client tests
  • model_clean_assert.CleanMock() - Context manager to track if model full_clean() was called
  • users - Utilities around user/permission setup for tests
  • time.MockTimeMonotonicGenerator() - Mock time.monotonic() with generic time stamps
  • AssertQueries() - Context manager with different checks of made database queries

### performance analysis

  • dbperf.query_recorder.SQLQueryRecorder - Context Manager that records SQL queries executed via the Django ORM

### humanize

  • humanize.time.human_timedelta() - Converts a time duration into a friendly text representation. (X ms, sec, minutes etc.)
  • templatetags.humanize_time.human_duration() - Verbose time since template tag, e.g.: <span title="Jan. 1, 2000, noon">2.0 seconds</span>
  • filename.filename2human_name() - Convert filename to a capitalized name
  • filename.clean_filename() - Convert filename to ASCII only via slugify

### view utilities

  • view_utils.dynamic_menu_urls.DynamicViewMenu() - Register views to build a simple menu with sections

### AWS stuff

  • bx_py_utils.aws.secret_manager.SecretsManager - Get values from AWS Secrets Manager
  • bx_py_utils.test_utils.mock_aws_secret_manager.SecretsManagerMock - Mock our SecretsManager() helper in tests
  • bx_py_utils.test_utils.mock_boto3session.MockedBoto3Session - Mock boto3.session.Session() (Currently only get_secret_value())
  • bx_py_utils.aws.client_side_cert_manager.ClientSideCertManager - Helper to manage client-side TLS certificate via AWS Secrets Manager

### misc

  • dict_utils.dict_get() - nested dict get()
  • dict_utils.pluck() - Extract values from a dict, if they are present
  • environ.cgroup_memory_usage() - Get the memory usage of the current cgroup
  • error_handling.print_exc_plus() - Print traceback information with a listing of all the local variables in each frame
  • iteration.chunk_iterable() - Create chunks off of any iterable
  • processify.processify() - Will execute the decorated function in a separate process
  • stacktrace.get_stacktrace() - Returns a filterable and easy-to-process stacktrace
  • anonymize.anonymize() - Anonymize a string (With special handling of email addresses)

## developing

To start developing e.g.:

`bash ~$ git clone https://github.com/boxine/bx_py_utils.git ~$ cd bx_py_utils ~/bx_py_utils$ make help                 List all commands install-poetry       install or update poetry install              install via poetry update               Update the dependencies as according to the pyproject.toml file lint                 Run code formatters and linter fix-code-style       Fix code formatting tox-listenvs         List all tox test environments tox                  Run pytest via tox with all environments tox-py36             Run pytest via tox with *python v3.6* tox-py37             Run pytest via tox with *python v3.7* tox-py38             Run pytest via tox with *python v3.8* tox-py39             Run pytest via tox with *python v3.9* pytest               Run pytest pytest-ci            Run pytest with CI settings publish              Release new version to PyPi makemessages         Make and compile locales message files start-dev-server     Start Django dev. server with the test project clean                Remove created files from the test project (e.g.: SQlite, static files) `

You can start the test project with the Django developing server, e.g.: `bash ~/bx_py_utils$ make start-dev-server ` This is a own manage command, that will create migrations files from our test app, migrate, collectstatic and create a super user if no user exists ;)

If you like to start from stretch, just delete related test project files with: `bash ~/bx_py_utils$ make clean ` ...and start the test server again ;)

## License

[MIT](LICENSE). Patches welcome!

## Links

Size

42.6 KB

Downloads

5

Status  Completed
Checksum (MD5) 1435ac2deb2136a91f19df0ca92350fb
Checksum (SHA-1) a9e6f0de4f380cfc80413c6d27a895c39587e043
Checksum (SHA-256) f7f872cd33678c64ddd1c5fad17c7aedfddf251151b97ff507aeb364508c262e
Checksum (SHA-512) 0b09e44e83e353d305ecf954fed48bd05d7eb5d8844bf2f64ecd8bef2e071db43e…
GPG Signature
GPG Fingerprint 6811684bac0b8895434e97bdd4391b8fb999e537
Storage Region  Dublin, Ireland
Type  Binary (contains binaries and binary artifacts)
Uploaded At 4 months, 3 weeks ago
Uploaded By Fetched by Cloudsmith
Slug Id bx_py_utils-24-py3-none-anywhl-q031
Unique Id SG3mgSiRLGJsnJzo
Version (Raw) 24
Version (Parsed)
  • Major: 24
  • Type: SemVer (Compat)
  extended metadata
Author Jens Diemer <jens.diemer@boxine.de>
Classifiers Development Status :: 5 - Production/Stable | Framework :: Django | Intended Audience :: Developers | License :: OSI Approved :: MIT License | Programming Language :: Python :: 3 | Programming Language :: Python :: 3.6 | Programming Language :: Python :: 3.7 | Programming Language :: Python :: 3.8 | Programming Language :: Python :: 3.9 | Topic :: Software Development :: Libraries :: Python Modules
Keywords django,utilities
Metadata Version 2.1
Py Filetype bdist_wheel
Py Version py3
Requires Dist django | python-stdnum
Requires Python >=3.6,<4.0.0
pkg bx_py_utils-24-py3-none-any.whl 5
42.6 KB
md5 sha1 sha256 sha512
Package Contents (bx_py_utils-24-py3-none-any.whl)
Loading...

This package has 85 files/directories.

 Newer Python logo
bx-py-utils
 102
5 Fetched by Cloudsmith
 Newer Python logo
bx-py-utils
 101
5 Fetched by Cloudsmith
 Newer Python logo
bx-py-utils
 100
5 Fetched by Cloudsmith
 Newer Python logo
bx-py-utils
 99
5 Fetched by Cloudsmith
 Newer Python logo
bx-py-utils
 98
5 Fetched by Cloudsmith
 Newer Python logo
bx-py-utils
 97
5 Fetched by Cloudsmith
 Newer Python logo
bx-py-utils
 96
5 Fetched by Cloudsmith
 Newer Python logo
bx-py-utils
 95
5 Fetched by Cloudsmith
 Newer Python logo
bx-py-utils
 94
5 Fetched by Cloudsmith
 Newer Python logo
bx-py-utils
 93
5 Fetched by Cloudsmith
  Python logo
bx-py-utils
 24
5 Fetched by Cloudsmith
 Older Python logo
bx-py-utils
 23
4 Fetched by Cloudsmith
 Older Python logo
bx-py-utils
 22
5 Fetched by Cloudsmith
 Older Python logo
bx-py-utils
 21
5 Fetched by Cloudsmith
 Older Python logo
bx-py-utils
 20
5 Fetched by Cloudsmith
 Older Python logo
bx-py-utils
 19
5 Fetched by Cloudsmith
 Older Python logo
bx-py-utils
 18
5 Fetched by Cloudsmith
 Older Python logo
bx-py-utils
 17
5 Fetched by Cloudsmith
 Older Python logo
bx-py-utils
 16
5 Fetched by Cloudsmith
 Older Python logo
bx-py-utils
 15
6 Fetched by Cloudsmith

Last scanned

4 months, 3 weeks ago

Scan result

Clean

Vulnerability count

0

Max. severity

Unknown

You can embed a badge in another website that shows this or the latest version of this package.

To embed the badge for this specific package version, use the following:

[![This version of 'bx-py-utils' @ Cloudsmith](https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bx-py-utils/24/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/?render=true)](https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bx-py-utils/24/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/)
|This version of 'bx-py-utils' @ Cloudsmith|
.. |This version of 'bx-py-utils' @ Cloudsmith| image:: https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bx-py-utils/24/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/?render=true
   :target: https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bx-py-utils/24/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/
image::https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bx-py-utils/24/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/?render=true[link="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bx-py-utils/24/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/",title="This version of 'bx-py-utils' @ Cloudsmith"]
<a href="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bx-py-utils/24/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/"><img src="https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bx-py-utils/24/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/?render=true" alt="This version of 'bx-py-utils' @ Cloudsmith" /></a>

rendered as: This version of 'bx-py-utils' @ Cloudsmith

To embed the badge for the latest package version, use the following:

[![Latest version of 'bx-py-utils' @ Cloudsmith](https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bx-py-utils/latest/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/?render=true&show_latest=true)](https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bx-py-utils/latest/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/)
|Latest version of 'bx-py-utils' @ Cloudsmith|
.. |Latest version of 'bx-py-utils' @ Cloudsmith| image:: https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bx-py-utils/latest/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/?render=true&show_latest=true
   :target: https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bx-py-utils/latest/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/
image::https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bx-py-utils/latest/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/?render=true&show_latest=true[link="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bx-py-utils/latest/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/",title="Latest version of 'bx-py-utils' @ Cloudsmith"]
<a href="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bx-py-utils/latest/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/"><img src="https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bx-py-utils/latest/a=noarch;xf=bdist_wheel;xn=bx-py-utils;xv=py3/?render=true&show_latest=true" alt="Latest version of 'bx-py-utils' @ Cloudsmith" /></a>

rendered as: Latest version of 'bx-py-utils' @ Cloudsmith

These instructions assume you have setup the repository first (or read it).

To install/use bx-py-utils @ version 24 ...

pip install 'bx-py-utils==24'

You can also install the latest version of this package:

pip install --upgrade 'bx-py-utils'

If necessary, you can specify the repository directly:

pip install \
  --index-url=https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/ \
  bx-py-utils==24

If you've got a project requirements.txt file, you can specify this as a dependency:

--index-url=https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/
bx-py-utils==24

In addition, you can use this repository as an extra index url. However, please read our documentation on this parameter before using it. For example in a requirements.txt file:

--extra-index-url=https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/
bx-py-utils==24
Warning: We highly recommend using pip (or similar) rather than installing directly.
Top