Skip to main content
`dossier.fc` is a Python package that provides an implementation of feature
collections. Abstractly, a feature collection is a map from feature name to
a feature. While any type of feature can be supported, the core focus of this
package is on *multisets* or "bags of words" (BOW). In this package, the
default multiset implementation is a `StringCounter`, which maps Unicode
strings to counts.

This package also includes utilities for serializing and deserializating
collections of feature collections to CBOR (Concise Binary Object
Representation).


### Installation

`dossier.fc` is on PyPI and can be installed with `pip`:

```bash
pip install dossier.fc
```

Currently, `dossier.fc` requires Python 2.7. It is not yet Python 3 compatible.


### Documentation

API documentation with examples is available as part of the Dossier Stack
documentation:
[http://dossier-stack.readthedocs.org](http://dossier-stack.readthedocs.org#module-dossier.fc)


### Examples and basic usage

By default, feature collections use `StringCounter` for feature representation:

```python
from dossier.fc import FeatureCollection

fc = FeatureCollection()
fc['NAME']['alice'] += 1
fc['NAME']['bob'] = 5

print type(fc['NAME'])
# output: StringCounter
```

As the name suggests, a `StringCounter` is a subclass of the `Counter` class
found in the Python standard library `collections` module. As such, it supports
binary operations like addition, subtraction, equality testing, etc.
The `FeatureCollection` class also provides these binary operations which are
performed on corresponding features. For example:

```python
from dossier.fc import FeatureCollection

fc1 = FeatureCollection({'NAME': {'alice': 1, 'bob': 1}})
fc2 = FeatureCollection({'NAME': {'alice': 1}})
fc3 = fc1 + fc2

assert fc3 == FeatureCollection({'NAME': {'alice': 2, 'bob': 1}})
```

Release files for dossier.fc 0.3.5

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

Source distribution (sdist)

Source distribution for dossier.fc 0.3.5
File Size Uploaded
dossier.fc-0.3.5.tar.gz 24.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dossier.fc 0.3.5
File Interpreter ABI Platform
dossier.fc-0.3.5-py2.7.egg Legacy Egg format - - Details

Total release size: 101.2 kB

Release files / dossier.fc-0.3.5.tar.gz

Download URL dossier.fc-0.3.5.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a0bcb2a469ee5236fbe169b505316397532e96483554a9058b1675ee2a349245
BLAKE2b-256 checksum
How to use checksums
ac8a96b7677b823fba209edfefb9b14d12e08b5b7d9822b71069b264234e6887
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / dossier.fc-0.3.5-py2.7.egg

Download URL dossier.fc-0.3.5-py2.7.egg
Size 76.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
e1e00faeeda45a5a08c2b2729e6b8b378a582eba0d3681ef16f1a6f98ca9fdd5
BLAKE2b-256 checksum
How to use checksums
8261f87eb1329cf6bfd7436a6e2d286544ec6a7b1600d4a3e7d20883dcf614ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.3

2 release files

0.0.0

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