Skip to content

deep-tw/py-suit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PySuit

Read the Docs codecov PyPI version

A unified collection of python functions eg dictsort,nested_iterator etc

Purpose of the Package

  • The purpose of the package is to provide a collection of fuction and module indices in one unified libary

Documentation

Features

  • Collection of PySuit
    • DictCollection
    • NestedCollections
    • ExcludeRandom
    • DataTypeCollection
  • Collection of DictCollection
    • dictsort
    • etc
  • Collection of NestedCollections
    • nested_iterator
    • etc
  • Collection of ExcludeRandom
    • exclude_random
    • etc
  • Collection of DataTypeCollection
    • fake_random_datatype
    • etc

Getting Started

The package can be found on pypi hence you can install it using pip

Installation

pip install pysuit

Usage

Using the short forms or abbreviated forms of indices

DictCollection

from pysuit import DictCollections

dict_collection = DictCollections()

dict_collection.dict_sort(dictionary , flag)

Examples of DictCollections

from pysuit import DictCollections
dict_collection = DictCollections()
dict_collection.dict_sort({"b": 3, "a": 34, 67: "c", 1: 64} , keys)
Sorted Dictionary is => {1: 64, 'a': 34, 'b': 3, 67: 'c'}

NestedCollections

from pysuit import NestedCollections

nested_collection = NestedCollections()

nested_collection.nested_iterator(nested_list)

Examples of NestedCollections

from pysuit import NestedCollections
nested_collection = NestedCollections()
nested_collection.nested_iterator([[0, 4], [2, 3, 4], [0, 1, 2], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4]])
Converted list is => [0, 4, 2, 3, 4, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4]

ExcludeRandom

from pysuit import ExcludeRandom

exclude_random = ExcludeRandom()

exclude_random.exclude_random(start, stop, [exclude numbers])

Examples of ExcludeRandom

from pysuit import ExcludeRandom
exclude_random = ExcludeRandom()
exclude_random.exclude_random(1, 10, [4, 5, 9])
Random number is => 8

DataTypeCollection

from pysuit import DataTypeCollection

data_collection = DataTypeCollection()

data_collection.fake_random_datatype(datatype, length of datatype)

Examples of DataTypeCollection

from pysuit import DataTypeCollection
data_collection = DataTypeCollection()
data_collection.fake_random_datatype(list, 10)
Fake random data is => [93, 91, 9163, -1967.88203, 3, 'thousand', -197247.03, 913, 983, 'thousand']

Contribution

Contributions are welcome Notice a bug let us know. Thanks

Author

  • Main Maintainer: Avinash Tiwari
  • Team Thoughtwin

License

  • MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages