Skip to main content

This module provides SField class which is ised to avaoid lambdas there where function of one argument is required to be applied to multiple items Examples of such cases could be functions like: - sorted - filter - map - etc

Also this module provides shortcuts (already built SField instances), that could be starting point of SField expressions. They are: SF, F Both are same.

For example

import requests
from anyfield import F, SView
data = requests.get('https://api.github.com/repos/vmg/redcarpet/issues?state=closed')
data = data.json()
view = SView(
 F['id'],
 F['state'],
 F['user']['login'],
 F['title'][:40],
 F['comments'].__q_if__("Has comments", "No comments"),
)
for row in view(data):
    print(row)

Will result in:

[121393880, u'closed', u'fusion809', u'Rendering of markdown in HTML tags']
[120824892, u'closed', u'nitoyon', u'Fix bufprintf for Windows MinGW-w64']
[118147051, u'closed', u'clemensg', u'Fix header anchor normalization']
[115033701, u'closed', u'mitchelltd', u'Unicode headers produce invalid anchors']
[113887752, u'closed', u'Stemby', u'Definition lists']
[113740700, u'closed', u'Stemby', u'Multiline tables']
[112952970, u'closed', u'im-kulikov', u"recipe for target 'redcarpet.so' failed"]
[112494169, u'closed', u'mstahl', u'Unable to compile native extensions in O']
[111961692, u'closed', u'reiz', u'Adding dependency badge to README']
[111582314, u'closed', u'jamesaduke', u'Pre tags on code are not added when you ']
[108204636, u'closed', u'shaneog', u'Push 3.3.3 to Rubygems']

Metadata

Release files for anyfield 0.3.1

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

Source distribution (sdist)

Source distribution for anyfield 0.3.1
File Size Uploaded
anyfield-0.3.1.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anyfield 0.3.1
File Interpreter ABI Platform
anyfield-0.3.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 16.9 kB

Release files / anyfield-0.3.1.tar.gz

Download URL anyfield-0.3.1.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d9d8637d9f71073b9b70a52f89a98970097af54758e025359b3ab950df51fee3
BLAKE2b-256 checksum
How to use checksums
f66bf7b7d06bceb4402ca91903246ef25dd2b07c6f00c727977d800a623eeb0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.8

Release files / anyfield-0.3.1-py2.py3-none-any.whl

Download URL anyfield-0.3.1-py2.py3-none-any.whl
Size 8.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
31e704f58d5d88a4df7a11dce498ebe2d8ca3c48bb4d83ad4e7feed1813ae28a
BLAKE2b-256 checksum
How to use checksums
48b19b50895834308fb3b667951b4857d46bc69e4f9b743e972b34a18d3f63e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

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