Skip to main content

SharedCollections contains some commonly used data structured collections, which can be accessed among some multiple access manager.

Project description

SharedCollections

SharedCollections contains, some commonly used data structure collections like queue and stack, which can be accessed by multiple access managers, individually. Currently it is alpha stage.

Version

The current version of this module is 0.0.2.

Check it by below command.

python3 -m sharedcollections.version

Dependencies

No such external dependencies, and currently it is supported in python 3.5+ only.

Installation

Using git

git clone https://github.com/antaripchatterjee/SharedCollections
cd SharedCollections
python3 setup.py install

Using pip

pip3 install SharedCollections

Uninstallation

pip3 uninstall SharedCollections

Usage

Example of using SharedQueue is given below as a reference.

from sharedcollections.queue import SharedQueue

if __name__ == "__main__":
    q = SharedQueue()
    # Constructor of SharedQueue can take two named aruguments
    # maxsize, default is None, decideds the maximum length of
    # items of the queue.
    # maxmgr. default is None, decideds the maximum count of the
    # managers of the queue.
    mgr1 = q.new_manager()
    q.put(1)
    mgr2 = q.new_manager()
    q.put(2)
    q.put(3)
    print('Length of mgr1', len(mgr1))
    print('Length of mgr2', len(mgr1))
    for i in mgr1:
        print(i, end=' ')
    print('\n------------------------')
    print(next(mgr2))
    print(mgr2.have_values())
    print(next(mgr2))

The above code will generate the below output.

Length of mgr1 3
Length of mgr2 2
1 2 3
------------------------
2
True
3

License

This library is licensed under MIT license.

Development

This is currently in Alpha stage, soon I will release a newer version with shared stack.

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

SharedCollections-0.0.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

SharedCollections-0.0.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file SharedCollections-0.0.2.tar.gz.

File metadata

  • Download URL: SharedCollections-0.0.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.2

File hashes

Hashes for SharedCollections-0.0.2.tar.gz
Algorithm Hash digest
SHA256 610315ba9a45940ea80454f7559907a0b61f83a159712c536fb5cf850bd773fe
MD5 7444b1ab1331ef925045e2e59f74478f
BLAKE2b-256 2f4b39b42bcedb415c35abe7b0571506304563b189491151ea81709732898205

See more details on using hashes here.

File details

Details for the file SharedCollections-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: SharedCollections-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.2

File hashes

Hashes for SharedCollections-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 94b8d90baad7776c0837471a8b7d7d69d891ed4b32868885f8ba13805c7c8eb9
MD5 fc3d986a1e0cdf78313e41fa2a5efbea
BLAKE2b-256 fd2959fa7e724157e59b9122c0da2761493eafcf2bba951faea606e29fc91831

See more details on using hashes here.

Supported by

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