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:
my-package.ext
(implicit)
filename:my-package.ext
(explicit)
Search by package tag:
latest
(implicit)
tag:latest
(explicit)
Search by package version:
1.0.0
(implicit)
version:1.0.0
(explicit)
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 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)
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,
Go,
Helm,
Hex,
LuaRocks,
Maven,
npm,
NuGet,
P2,
Python,
RedHat,
Ruby,
Swift,
Terraform,
Vagrant,
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.
funcy 1.14
One-liner (summary)
Description
Funcy
A collection of fancy functional tools focused on practicality.
Inspired by clojure, underscore and my own abstractions. Keep reading to get an overview or read the docs. Or jump directly to cheatsheet.
Works with Python 2.7, 3.4+ and pypy.
Installation
pip install funcy
Overview
Import stuff from funcy to make things happen:
from funcy import whatever, you, need
Merge collections of same type (works for dicts, sets, lists, tuples, iterators and even strings):
merge(coll1, coll2, coll3, ...) join(colls) merge_with(sum, dict1, dict2, ...)
Walk through collection, creating its transform (like map but preserves type):
walk(str.upper, {'a', 'b'}) # {'A', 'B'} walk(reversed, {'a': 1, 'b': 2}) # {1: 'a', 2: 'b'} walk_keys(double, {'a': 1, 'b': 2}) # {'aa': 1, 'bb': 2} walk_values(inc, {'a': 1, 'b': 2}) # {'a': 2, 'b': 3}
Select a part of collection:
select(even, {1,2,3,10,20}) # {2,10,20} select(r'^a', ('a','b','ab','ba')) # ('a','ab') select_keys(callable, {str: '', None: None}) # {str: ''} compact({2, None, 1, 0}) # {1,2}
Manipulate sequences:
take(4, iterate(double, 1)) # [1, 2, 4, 8] first(drop(3, count(10))) # 13 lremove(even, [1, 2, 3]) # [1, 3] lconcat([1, 2], [5, 6]) # [1, 2, 5, 6] lcat(map(range, range(4))) # [0, 0, 1, 0, 1, 2] lmapcat(range, range(4)) # same flatten(nested_structure) # flat iter distinct('abacbdd') # iter('abcd') lsplit(odd, range(5)) # ([1, 3], [0, 2, 4]) lsplit_at(2, range(5)) # ([0, 1], [2, 3, 4]) group_by(mod3, range(5)) # {0: [0, 3], 1: [1, 4], 2: [2]} lpartition(2, range(5)) # [[0, 1], [2, 3]] chunks(2, range(5)) # iter: [0, 1], [2, 3], [4] pairwise(range(5)) # iter: [0, 1], [1, 2], ...
And functions:
partial(add, 1) # inc curry(add)(1)(2) # 3 compose(inc, double)(10) # 21 complement(even) # odd all_fn(isa(int), even) # is_even_int one_third = rpartial(operator.div, 3.0) has_suffix = rcurry(str.endswith)
Create decorators easily:
@decorator def log(call): print call._func.__name__, call._args return call()
Abstract control flow:
walk_values(silent(int), {'a': '1', 'b': 'no'}) # => {'a': 1, 'b': None} @once def initialize(): "..." with suppress(OSError): os.remove('some.file') @ignore(ErrorRateExceeded) @limit_error_rate(fails=5, timeout=60) @retry(tries=2, errors=(HttpError, ServiceDown)) def some_unreliable_action(...): "..." class MyUser(AbstractBaseUser): @cached_property def public_phones(self): return self.phones.filter(public=True)
Ease debugging:
squares = {tap(x, 'x'): tap(x * x, 'x^2') for x in [3, 4]} # x: 3 # x^2: 9 # ... @print_exits def some_func(...): "..." @log_calls(log.info, errors=False) @log_errors(log.exception) def some_suspicious_function(...): "..." with print_durations('Creating models'): Model.objects.create(...) # ... # 10.2 ms in Creating models
And much more.
Dive in
Funcy is an embodiment of ideas I explain in several essays:
Status | Completed |
---|---|
Checksum (MD5) | e98a76c8d3ec2bbf8782fbc417e785fd |
Checksum (SHA-1) | 37c8bbd66a44b6ffaf0dc06be18881b536897823 |
Checksum (SHA-256) | aa238f8c9e816a9fe13067c9b05831adbaac7b696f266b6ba2ce4ce23b73e83e |
Checksum (SHA-512) | b430679ba49cefd5edfb6ce63a32d99ff18195a2e58f352f7e1391d5d448122a0e… |
GPG Signature | |
Storage Region | Dublin, Ireland |
Type | Binary (contains binaries and binary artifacts) |
Uploaded At | 4 years, 6 months ago |
Uploaded By | |
Slug Id | funcy-114-py2py3-none-anywhl |
Unique Id | dND5QXf64lX5 |
Version (Raw) | 1.14 |
Version (Parsed) |
|
extended metadata | |
Author | Alexander Schepanovski <suor.web@gmail.com> |
Classifiers | Development Status :: 5 - Production/Stable | Intended Audience :: Developers | License :: OSI Approved :: BSD License | Operating System :: OS Independent | Programming Language :: Python | Programming Language :: Python :: 2 | Programming Language :: Python :: 2.7 | Programming Language :: Python :: 3 | Programming Language :: Python :: 3.4 | Programming Language :: Python :: 3.5 | Programming Language :: Python :: 3.6 | Programming Language :: Python :: 3.7 | Programming Language :: Python :: 3.8 | Programming Language :: Python :: Implementation :: CPython | Programming Language :: Python :: Implementation :: PyPy | Topic :: Software Development :: Libraries :: Python Modules |
Homepage URL | http://github.com/Suor/funcy |
Metadata Version | 2.1 |
Py Filetype | bdist_wheel |
Py Version | py2.py3 |
pkg | funcy-1.14-py2.py3-none-any.whl |
48
31.3 KB |
md5 | sha1 | sha256 | sha512 |
This package has 27 files/directories.
Security Scanning:
You can't see this because your subscription doesn't include this feature, sorry!
With Security Scanning, Cloudsmith will scan your artifacts for vulnerabilities when they're uploaded. These are then presented to you via the UI and the API, so that you can build rules into your CI/CD pipelines to decide how to handle low, medium, high and critical software vulnerabilities.
If you'd like to trial or ask about the Security Scanning feature, just ask us. We'll be happy to help!
Last scanned
1 week, 4 days ago
Scan result
Vulnerable
Vulnerability count
1
Max. severity
CriticalTarget: | ||
CRITICAL |
CVE-5868-43186: library: vulnerability titlePackage Name: package_name Installed Version: 1.7.54 Fixed Version: 2.5.31 References: www.stewart.org www.hicks.com watson.com |
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 'funcy' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/funcy/1.14/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/?render=true)](https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/funcy/1.14/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/)
|This version of 'funcy' @ Cloudsmith|
.. |This version of 'funcy' @ Cloudsmith| image:: https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/funcy/1.14/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/?render=true
:target: https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/funcy/1.14/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/
image::https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/funcy/1.14/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/?render=true[link="https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/funcy/1.14/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/",title="This version of 'funcy' @ Cloudsmith"]
<a href="https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/funcy/1.14/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/funcy/1.14/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/?render=true" alt="This version of 'funcy' @ Cloudsmith" /></a>
rendered as:
To embed the badge for the latest package version, use the following:
[![Latest version of 'funcy' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/funcy/latest/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/?render=true&show_latest=true)](https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/funcy/latest/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/)
|Latest version of 'funcy' @ Cloudsmith|
.. |Latest version of 'funcy' @ Cloudsmith| image:: https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/funcy/latest/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/?render=true&show_latest=true
:target: https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/funcy/latest/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/
image::https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/funcy/latest/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/?render=true&show_latest=true[link="https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/funcy/latest/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/",title="Latest version of 'funcy' @ Cloudsmith"]
<a href="https://cloudsmith.io/~agriconnect/repos/python/packages/detail/python/funcy/latest/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/agriconnect/python/python/funcy/latest/a=noarch;xf=bdist_wheel;xn=funcy;xv=py2.py3/?render=true&show_latest=true" alt="Latest version of 'funcy' @ Cloudsmith" /></a>
rendered as:
These instructions assume you have setup the repository first (or read it).
To install/use funcy @ version 1.14 ...
pip install 'funcy==1.14'
You can also install the latest version of this package:
pip install --upgrade 'funcy'
If necessary, you can specify the repository directly:
pip install \
--index-url=https://dl.cloudsmith.io/public/agriconnect/python/python/simple/ \
funcy==1.14
If you've got a project requirements.txt file, you can specify this as a dependency:
--index-url=https://dl.cloudsmith.io/public/agriconnect/python/python/simple/
funcy==1.14
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/agriconnect/python/python/simple/
funcy==1.14