METADATA 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. Metadata-Version: 2.4
  2. Name: smmap
  3. Version: 5.0.3
  4. Summary: A pure Python implementation of a sliding window memory map manager
  5. Home-page: https://github.com/gitpython-developers/smmap
  6. Author: Sebastian Thiel
  7. Author-email: byronimo@gmail.com
  8. License: BSD-3-Clause
  9. Platform: any
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Environment :: Console
  12. Classifier: Intended Audience :: Developers
  13. Classifier: License :: OSI Approved :: BSD License
  14. Classifier: Operating System :: OS Independent
  15. Classifier: Operating System :: POSIX
  16. Classifier: Operating System :: Microsoft :: Windows
  17. Classifier: Operating System :: MacOS :: MacOS X
  18. Classifier: Programming Language :: Python
  19. Classifier: Programming Language :: Python :: 3
  20. Classifier: Programming Language :: Python :: 3.7
  21. Classifier: Programming Language :: Python :: 3.8
  22. Classifier: Programming Language :: Python :: 3.9
  23. Classifier: Programming Language :: Python :: 3.10
  24. Classifier: Programming Language :: Python :: 3.11
  25. Classifier: Programming Language :: Python :: 3.12
  26. Classifier: Programming Language :: Python :: 3.13
  27. Classifier: Programming Language :: Python :: 3 :: Only
  28. Requires-Python: >=3.7
  29. Description-Content-Type: text/markdown
  30. License-File: LICENSE
  31. Dynamic: author
  32. Dynamic: author-email
  33. Dynamic: classifier
  34. Dynamic: description
  35. Dynamic: description-content-type
  36. Dynamic: home-page
  37. Dynamic: license
  38. Dynamic: license-file
  39. Dynamic: platform
  40. Dynamic: requires-python
  41. Dynamic: summary
  42. ## Motivation
  43. When reading from many possibly large files in a fashion similar to random access, it is usually the fastest and most efficient to use memory maps.
  44. Although memory maps have many advantages, they represent a very limited system resource as every map uses one file descriptor, whose amount is limited per process. On 32 bit systems, the amount of memory you can have mapped at a time is naturally limited to theoretical 4GB of memory, which may not be enough for some applications.
  45. ## Limitations
  46. * **System resources (file-handles) are likely to be leaked!** This is due to the library authors reliance on a deterministic `__del__()` destructor.
  47. * The memory access is read-only by design.
  48. ## Overview
  49. ![Python package](https://github.com/gitpython-developers/smmap/workflows/Python%20package/badge.svg)
  50. Smmap wraps an interface around mmap and tracks the mapped files as well as the amount of clients who use it. If the system runs out of resources, or if a memory limit is reached, it will automatically unload unused maps to allow continued operation.
  51. To allow processing large files even on 32 bit systems, it allows only portions of the file to be mapped. Once the user reads beyond the mapped region, smmap will automatically map the next required region, unloading unused regions using a LRU algorithm.
  52. Although the library can be used most efficiently with its native interface, a Buffer implementation is provided to hide these details behind a simple string-like interface.
  53. For performance critical 64 bit applications, a simplified version of memory mapping is provided which always maps the whole file, but still provides the benefit of unloading unused mappings on demand.
  54. ## Prerequisites
  55. * Python 3.7+
  56. * OSX, Windows or Linux
  57. The package was tested on all of the previously mentioned configurations.
  58. ## Installing smmap
  59. [![Documentation Status](https://readthedocs.org/projects/smmap/badge/?version=latest)](https://readthedocs.org/projects/smmap/?badge=latest)
  60. Its easiest to install smmap using the [pip](http://www.pip-installer.org/en/latest) program:
  61. ```bash
  62. $ pip install smmap
  63. ```
  64. As the command will install smmap in your respective python distribution, you will most likely need root permissions to authorize the required changes.
  65. If you have downloaded the source archive, the package can be installed by running the `setup.py` script:
  66. ```bash
  67. $ python setup.py install
  68. ```
  69. It is advised to have a look at the **Usage Guide** for a brief introduction on the different database implementations.
  70. ## Homepage and Links
  71. The project is home on github at https://github.com/gitpython-developers/smmap .
  72. The latest source can be cloned from github as well:
  73. * git://github.com/gitpython-developers/smmap.git
  74. For support, please use the git-python mailing list:
  75. * http://groups.google.com/group/git-python
  76. Issues can be filed on github:
  77. * https://github.com/gitpython-developers/smmap/issues
  78. A link to the pypi page related to this repository:
  79. * https://pypi.org/project/smmap/
  80. ## License Information
  81. *smmap* is licensed under the New BSD License.