Skip to main content

Scala-inspired data structures for Python

Project description

scalaps

See blog post, Introducing scalaps: Scala-inspired data structures for Python to learn about using this library.

A functional, object-oriented approach for working with sequences and collections. Also similar to Java Streams. Hope you find they simplify your code by providing a plethora of common algorithms for working with sequences and collections.

Example

from scalaps import ScSeq

(ScSeq(range(10))
 .map(lambda x: x+3)
 .filter(lambda x: x%2==0)
 .group_by(lambda x: x%3)
 .items()
 .for_each(print))

Output

(1, ScList([4, 10]))
(0, ScList([6, 12]))
(2, ScList([8]))

Examples

See examples/ directory for additional examples of using scalaps.

Also see example usages in career_village_entities.

Closing Remarks

Very much a work in progress. Expect major changes as the library evolves. I'd appreciate other people's input, so feel free to submit a PR.

Contact: Matt Hagy matthew.hagy@gmail.com

Project details


Download files

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

Source Distribution

scalaps-0.0.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scalaps-0.0.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file scalaps-0.0.3.tar.gz.

File metadata

  • Download URL: scalaps-0.0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.0

File hashes

Hashes for scalaps-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e679bf008c83b0653688f6ec22c5dc8c4965f70cdfedbee8229cfb31346be1e2
MD5 f8c3cf291026498100788450a51568e2
BLAKE2b-256 1746a9bd6f2c1373fac3aff985d9b2090525bd16d493771ac8dfdc15553808f7

See more details on using hashes here.

File details

Details for the file scalaps-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: scalaps-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.0

File hashes

Hashes for scalaps-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a09591f50796ea16a872241a0e2a6a47b4ec61baa51639bff013c2d96dcbaf05
MD5 1895eb93568c8fdf36803150f5f3db26
BLAKE2b-256 49da4d2c67e1ef1480101edc6e983a987215df8a397fa4e11409a5428221a45e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page