Giter Site home page Giter Site logo

strct's Introduction

strct

PyPI-Status PyPI-Versions Build-Status Codecov LICENCE

A small pure-python package for data strcture related utility functions.

from strct.dict import get_nested_val

>>> dict_obj = {'a': {'b': 7}}
>>> get_nested_val(('a', 'b'), dict_obj)
7

Install strct with:

pip install strct

strct is divided into five sub-modules:

Getting values from nested dicts in various ways; operations on number-valued dicts; merging, normalizing, reversing and printing dicts (nicely)

Index and element shifts that preserve order.

Operations on sets:

  • Getting a set element by a priority list.

Operations on sortedcontainers.SortedList objects.

Provide cross-kernel stable hash functions that work for built-in data structures and types, and for any custom data structure complying with the iterable or dict schemes.

Package author and current maintainer is Shay Palachy ([email protected]); You are more than welcome to approach him for help. Contributions are very welcomed.

Clone:

git clone [email protected]:shaypal5/strct.git

Install in development mode with test dependencies:

cd strct
pip install -e ".[test]"

To run the tests, use:

python -m pytest --cov=strct --doctest-modules

This project is documented using the numpy docstring conventions, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings (in my personal opinion, of course). When documenting code you add to this project, please follow these conventions.

Created by Shay Palachy ([email protected]).

strct's People

Contributors

shaypal5 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.