Littletable

Latest version: v3.0.1

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 8

2.2.5

-------------
- Enhanced `Table.by`, `Table.all`, and `Table.search` methods to accept a field name that is not
a valid identifier by using a callable interface:

tbl = lt.csv_import(
"https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes/blob/master/all/all.csv?raw=true"
)

field "region" is a valid Python identifier
regions = list(tbl.all.region.unique)

field "sub-region" is not a valid Python identifier, use callable interface
sub_regions = list(tbl.all("sub-region").unique)

- Added `examples/pyscript/matplotlib.html` example, showing how to use `littletable` within
a Pyscript static HTML file.

- Fixed minor code error in `Table.by` when determining if an index is unique or not.
(Not a bug, just fixed some bug-prone code.)

- Expanded `peps.py` example to Jupyter Notebook `PEPs data demo.ipynb`.

- Renamed `delete_index` to `drop_index` for more symmetry with SQL. `delete_index` is retained
for compatibility.

2.2.4

-------------
- Added support for Python 3.13.

- Renamed `sort` to `orderby` to make the symmetry with relational SQL more apparent.
`sort` will be retained as a deprecated compatibility name.

- Added `Table.rank()` method, to add a ranking attribute to each object in the
table.

- Added/cleaned up many type annotations.

2.2.3

-------------
- Fixed bug when calling `add_field` on an existing field that has been indexed, that
the index on that field would not reflect the new values.

- Added support for optional named arguments to `csv_import`,
`tsv_import`, `json_import`, and `excel_import` methods when the import
source is an HTTP or HTTPS URL:
- `headers`: dict to be used as request headers
- `body`: bytes for request body
- `username`: str to be added for basic authentication
- `password`: str to be added for basic authentication (default='')
- `context`: SSL Context passed to urlopen (see the urlopen docs at
https://docs.python.org/3/library/urllib.request.html#urllib.request.urlopen);
`capath` and `cafile` may be used instead, but use of these arguments is
deprecated and so discouraged

- Added `Table.as_dataframe()` method to make a pandas `DataFrame` from a
`littletable.Table`, and example `table_to_dataframe.py`.

2.2.2

-------------
- Fixed bug using `datetime.UTC` (only available under Python 3.11 - sorry!)

2.2.1

-------------
- Rewrote handling of multiple custom `JSONEncoder`s to use multiple
inheritance instead of explicit call chaining.

- 20-30% performance speedup when creating a search index.

- Better detection of English plurals when building search indexes. Searching
will also detect `Error`, `Exception`, and `Warning` word endings, which are
common in code documentation.

- Added module-level convenience methods for building `Table`s and importing from
CSV, TSV, JSON, or Excel files, so that in place of:

import littletable as lt
tbl = lt.Table()
tbl.csv_import(csv_data_file)

You can just write:

import littletable as lt
tbl = lt.csv_import(csv_data_file)

- Updated examples to new search return type, and new module-level `csv_import()`.
Also added new example `csv_import_examples.py` showing multiple snippets of
importing CSV data.

- Tables now keep track of timestamps when they were created, last modified, and
last imported.

2.2.0

-------------
- BREAKING CHANGES:

- Support for Python versions <3.9 is dropped in this version. To run on
these older Python's, use `littletable` 2.1.2.

- The results from full text searches now return a Table by default.

- Added `DeprecationWarning` for usage of `DataObject` class. New code should
use `types.SimpleNamespaces`, or just plain Python dicts (which get stored
as `SimpleNamespaces`), namedtuples, or other user-defined class.

- Text search handles common English regular and irregular plural forms and
resolves to their singular forms for word searching.

- The Table of results returned from a full text search now gets titled with
the search query string.

- A new example for full text searches is included, `star_trek_tos.py`,
illustrating CSV import and table sorting, and searching episode descriptions
for keywords.

Page 2 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.