fmd5sum


Namefmd5sum JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA faster MD5 sum calculator that uses concurrency.
upload_time2024-04-22 09:29:36
maintainerNone
docs_urlNone
authorYour Name
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # fmd5sum

This script will use Python’s hashlib library, which provides the MD5 functionality, and try to optimize the file reading and hashing process using buffers and possibly concurrency.

## How It Works
- Hash Function: Uses hashlib.md5() to create a new MD5 hash object.
- File Reading: Reads the file in chunks (specified by blocksize) to handle large files efficiently.
- Concurrency: Utilizes ThreadPoolExecutor from Python's concurrent.futures module to hash multiple files in parallel, which can significantly speed up the process when dealing with multiple files on multi-core processors.
- Error Handling: Gracefully handles errors such as missing files or read permissions.

## Usage
You would run this script from the command line, providing the files you wish to hash as arguments. For example:

```bash
python fmd5sum.py file1.txt file2.txt
```

This command will print the MD5 hashes of `file1.txt` and `file2.txt`.

## Notes
- Performance: While this script adds concurrency, its performance benefit will primarily be seen when processing multiple files due to the overhead of starting Python and loading libraries. The read operation's optimization (by using a large block size) also helps with very large files.    Installation: Make sure you have Python installed on your system to use this script. Most Linux systems have Python installed by default.
- Limitations: For single, especially smaller, files, the original md5sum might still outperform this script due to the overhead of Python.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fmd5sum",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/2c/0f/4dfc5f2175f26580684d6616f3ad955dd8dbffa10ad3fa7a20f3512b0096/fmd5sum-0.1.0.tar.gz",
    "platform": null,
    "description": "# fmd5sum\n\nThis script will use Python\u2019s hashlib library, which provides the MD5 functionality, and try to optimize the file reading and hashing process using buffers and possibly concurrency.\n\n## How It Works\n- Hash Function: Uses hashlib.md5() to create a new MD5 hash object.\n- File Reading: Reads the file in chunks (specified by blocksize) to handle large files efficiently.\n- Concurrency: Utilizes ThreadPoolExecutor from Python's concurrent.futures module to hash multiple files in parallel, which can significantly speed up the process when dealing with multiple files on multi-core processors.\n- Error Handling: Gracefully handles errors such as missing files or read permissions.\n\n## Usage\nYou would run this script from the command line, providing the files you wish to hash as arguments. For example:\n\n```bash\npython fmd5sum.py file1.txt file2.txt\n```\n\nThis command will print the MD5 hashes of `file1.txt` and `file2.txt`.\n\n## Notes\n- Performance: While this script adds concurrency, its performance benefit will primarily be seen when processing multiple files due to the overhead of starting Python and loading libraries. The read operation's optimization (by using a large block size) also helps with very large files.    Installation: Make sure you have Python installed on your system to use this script. Most Linux systems have Python installed by default.\n- Limitations: For single, especially smaller, files, the original md5sum might still outperform this script due to the overhead of Python.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A faster MD5 sum calculator that uses concurrency.",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6976b63634296861675150228a2d3ccc51072252109bc10bf3fcbb9563ce426d",
                "md5": "896c941c35342bbcd1e9ff9fd9245242",
                "sha256": "1bb0f4c8273217f6a12c1e1077974346b8d1fe3b7afc2f3dcefb3f2d6d201f7a"
            },
            "downloads": -1,
            "filename": "fmd5sum-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "896c941c35342bbcd1e9ff9fd9245242",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3081,
            "upload_time": "2024-04-22T09:29:34",
            "upload_time_iso_8601": "2024-04-22T09:29:34.803036Z",
            "url": "https://files.pythonhosted.org/packages/69/76/b63634296861675150228a2d3ccc51072252109bc10bf3fcbb9563ce426d/fmd5sum-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c0f4dfc5f2175f26580684d6616f3ad955dd8dbffa10ad3fa7a20f3512b0096",
                "md5": "58ca88f204367ef8bbbd8c889147cbb7",
                "sha256": "6a910fb6c0c6fdf7918c8fc7585d1b19d94f80cd1af14044e433e7fac25e1fe3"
            },
            "downloads": -1,
            "filename": "fmd5sum-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "58ca88f204367ef8bbbd8c889147cbb7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2700,
            "upload_time": "2024-04-22T09:29:36",
            "upload_time_iso_8601": "2024-04-22T09:29:36.217740Z",
            "url": "https://files.pythonhosted.org/packages/2c/0f/4dfc5f2175f26580684d6616f3ad955dd8dbffa10ad3fa7a20f3512b0096/fmd5sum-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-22 09:29:36",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "fmd5sum"
}
        
Elapsed time: 1.27708s