Skip to main content
# Teddy

~~Teddy is not Pandas. Teddy is lightweight and snuggly.~~

~~Teddy is straightforward and understands you. Teddy loves you.~~

More importantly, Teddy is not ready for prime time.

## Feature overview

Teddy loves you so much, it will work with vanilla Python types.

```python
from collections
record = namedtuple
data = list()
```

## Python WTFs

### `__getattr__` also gets called for third-party AttributeErrors

Default attribute access does also forward to your `__getattr__` if a property descriptor raises
an unrelated `AttributeError`.

```
In [6]: class A:
...: @property
...: def result(self):
...: return [1,2].a
...:
...: def __getattr__(self, key):
...: print('hah')
...:

In [7]: A().result
hah
```

### `inspect.signature` doesn't get along with `@staticmethod` in custom object

```
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import inspect

In [2]: class A:
...: @staticmethod
...: def __call__(x,y):
...: return y
...:

In [3]: inspect.signature(A())
Out[3]: <Signature (y)>

In [4]: inspect.signature(A().__call__)
Out[4]: <Signature (x, y)>
```

## TODOs

* [ ] the code could become simpler if it used key, value pairs everywhere internally?
* [ ] tests for attr_mapping
* [ ] prettyprinter is a bit meh sometimes
* [x] I need a read-only wrapper around dicts for using attrs instead of indexing.
* [x] get rid of no_value?
* [x] find another name for IndexedMapping?
* [x] support indexing by another Teddy instance or an IndexedMapping.
* [x] we need a sequential type that exposes a dict interface but stores a list internally...
* ~~[ ] figure out a structure for POPO vs other possible impls~~
* [x] add tests
* [ ] figure out a name for different kinds of predicates
* [x] add support for implicit lambdas
* [x] support for a literal function that allows for accessing any constant in a dict that has special meaning for teddy.


Metadata

Release files for teddy 0.0.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 teddy 0.0.1
File Size Uploaded Provenance
teddy-0.0.1.tar.gz 58.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for teddy 0.0.1
File Interpreter ABI Platform
teddy-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 73.3 kB

Release files / teddy-0.0.1.tar.gz

Download URL teddy-0.0.1.tar.gz
Size 58.7 kB
Tags Source
SHA-256 checksum
How to use checksums
096989089ce5766fc0de16fc219693275e38f2d0fcfc3fdbf83ccc75809cfbdb
BLAKE2b-256 checksum
How to use checksums
39380b6405a3864669a6553f8cf2848f5930fc9f78d570fcc75bca76c5b5eda1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Release files / teddy-0.0.1-py3-none-any.whl

Download URL teddy-0.0.1-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
727ecf5d3f811365dce52e03de523b8e7d55b9d4d15c85a58b1926194da0d993
BLAKE2b-256 checksum
How to use checksums
dbcd98a9b73a6275f0a851b66f81845ad51f50c1a3a8f0433606dc3e1ac9d219
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Security for teddy 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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