Skip to main content
Help us improve Python packaging – donate today!

A LINQ-esque project.

Project Description

Introduction

This is an implementation of LINQ in Python.

Functions

  • between(a, b, key=None): Returns items between a and b. (Inclusive).
  • count(): Consumes all items to produce a count.
  • dict(key=None, transform=None): Returns a dict of all items.
  • exclude(items, key=None): Excludes all items based on either their identity, or a key function.
  • extend(items): Yields all the items from this._items, followed by the items supplied to this function.
  • filter(key): Filter the items.
  • first(key=None): Take the first item if key is None, otherwise take the first item where key(item) returns true. If there are no objects, StopIteration is raised.
  • first_or_none(key=None): Take the first item if key is None, otherwise take the first item where key(item) returns true. If there are no objects, None is returned.
  • flatten(): Flatten a two-dimensional result set into a single dimension.
  • group(key): Groups all items on key.
  • join(glue=’‘): Joins the items by glue, where glue is a string. Calls glue.join.
  • last(key=None): Take the last item if key is None, otherwise take the first item where key(item) returns true. If there are no objects, StopIteration is raised.
  • last_or_none(key=None): Take the first item if key is None, otherwise take the first item where key(item) returns true. If there are no objects, None is returned.
  • len(): Consumes all items to produce a count.
  • list(): Returns a list of all items.
  • map(transform): Map the items.
  • not_none(): Returns all items except None.
  • partition(n): Takes n items and returns them in a new Slinkie. Does so until the items are consumed.
  • select(transform): Map the items.
  • set(): Returns a set of all items.
  • skip(n): Skip n items.
  • sort(key=None, reverse=False): Sorts the items by key.
  • take(n): Take n items.
  • transpose(): Transposes the contents of a Slinkie.
  • tuple(): Returns a tuple of all items.
  • where(key): Filter the items.

Installation

Slinkie is available on pip, so a simple “pip install slinkie” should do it.

Release history Release notifications

History Node

0.4.0

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.11

History Node

0.1.10

History Node

0.1.9

History Node

0.1.8

This version
History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.0

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
slinkie-0.1.7-py3-none-any.whl (4.9 kB) Copy SHA256 hash SHA256 Wheel py3 Jul 17, 2017
slinkie-0.1.7.tar.gz (4.1 kB) Copy SHA256 hash SHA256 Source None Jul 17, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page