claws


Nameclaws JSON
Version 0.0.21 PyPI version JSON
download
home_pagehttps://gitlab.com/crossref/labs/distrunner
SummaryThe Crossref Labs AWS tooling system.
upload_time2024-01-15 15:20:42
maintainer
docs_urlNone
authorMartin Paul Eve
requires_python>=3.8
licenseCopyright © 2023 Crossref Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords distributed computing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Claws: Crossref Labs AWS Tools
Claws is a Python module that provides a simple and convenient way to interact with AWS services, such as S3 and CloudWatch. It utilizes the boto3 library and aiohttp for asynchronous operations, making it ideal for applications that require high-performance and efficient resource utilization.

![license](https://img.shields.io/gitlab/license/crossref/labs/claws) ![activity](https://img.shields.io/gitlab/last-commit/crossref/labs/claws)

![AWS](https://img.shields.io/badge/AWS-%23FF9900.svg?style=for-the-badge&logo=amazon-aws&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)

This is a prototype Crossref Labs system. It is not guaranteed to be stable and the metadata schema and behaviour may be subject to change at any time.

## Features
* S3 client and resource management with automatic deferred initialization
* Presigned URL generation for S3 objects
* Asynchronous downloading of multiple S3 objects
* Retrieval of S3 objects as strings
* Custom exception handling for S3 object retrieval errors
* Easy integration with monitoring and instrumentation tools
* Streaming upload to S3 to handle large JSON files

## Requirements
* Python 3.6 or higher
* boto3
* aiohttp
* smart-open

## Installation

To install the Claws module, simply use the following pip command:

    pip install claws

## Usage
Here is a basic example of how to use the Claws module to interact with AWS S3:

    from claws.aws_utils import AWSConnector


    # Initialize the AWSConnector with a specific S3 bucket
    connector = AWSConnector(bucket="my-bucket", unsigned=False)
    
    # Download an S3 object as a string
    result = connector.s3_obj_to_str(bucket="my-bucket", s3_path="path/to/object.txt")
    
    # Download multiple S3 objects asynchronously in parallel
    s3_objects = ["path/to/object1.txt", "path/to/object2.txt", "path/to/object3.txt"]
    results = connector.get_multiple_s3_objs(bucket="my-bucket", s3_objs=s3_objects)
    
    for result in results:
        print(result)

## Contributing
Contributions to the Claws module are welcome. Please feel free to submit pull requests or report issues on the GitHub repository.

## License
Claws is released under the [MIT License](https://opensource.org/licenses/MIT).

# Credits
* [.gitignore](https://github.com/github/gitignore) from Github.
* [AWS Lambda Powertools](https://awslabs.github.io/aws-lambda-powertools-python/2.10.0/) by Amazon.

© Crossref 2023

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/crossref/labs/distrunner",
    "name": "claws",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Martin Paul Eve <meve@crossref.org>",
    "keywords": "distributed computing",
    "author": "Martin Paul Eve",
    "author_email": "meve@crossref.org",
    "download_url": "https://files.pythonhosted.org/packages/e9/70/6d1ff0b9db513b3fd6ee0d7ba62a910fc244cf07563fe7c95130c55c4abc/claws-0.0.21.tar.gz",
    "platform": null,
    "description": "# Claws: Crossref Labs AWS Tools\nClaws is a Python module that provides a simple and convenient way to interact with AWS services, such as S3 and CloudWatch. It utilizes the boto3 library and aiohttp for asynchronous operations, making it ideal for applications that require high-performance and efficient resource utilization.\n\n![license](https://img.shields.io/gitlab/license/crossref/labs/claws) ![activity](https://img.shields.io/gitlab/last-commit/crossref/labs/claws)\n\n![AWS](https://img.shields.io/badge/AWS-%23FF9900.svg?style=for-the-badge&logo=amazon-aws&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)\n\nThis is a prototype Crossref Labs system. It is not guaranteed to be stable and the metadata schema and behaviour may be subject to change at any time.\n\n## Features\n* S3 client and resource management with automatic deferred initialization\n* Presigned URL generation for S3 objects\n* Asynchronous downloading of multiple S3 objects\n* Retrieval of S3 objects as strings\n* Custom exception handling for S3 object retrieval errors\n* Easy integration with monitoring and instrumentation tools\n* Streaming upload to S3 to handle large JSON files\n\n## Requirements\n* Python 3.6 or higher\n* boto3\n* aiohttp\n* smart-open\n\n## Installation\n\nTo install the Claws module, simply use the following pip command:\n\n    pip install claws\n\n## Usage\nHere is a basic example of how to use the Claws module to interact with AWS S3:\n\n    from claws.aws_utils import AWSConnector\n\n\n    # Initialize the AWSConnector with a specific S3 bucket\n    connector = AWSConnector(bucket=\"my-bucket\", unsigned=False)\n    \n    # Download an S3 object as a string\n    result = connector.s3_obj_to_str(bucket=\"my-bucket\", s3_path=\"path/to/object.txt\")\n    \n    # Download multiple S3 objects asynchronously in parallel\n    s3_objects = [\"path/to/object1.txt\", \"path/to/object2.txt\", \"path/to/object3.txt\"]\n    results = connector.get_multiple_s3_objs(bucket=\"my-bucket\", s3_objs=s3_objects)\n    \n    for result in results:\n        print(result)\n\n## Contributing\nContributions to the Claws module are welcome. Please feel free to submit pull requests or report issues on the GitHub repository.\n\n## License\nClaws is released under the [MIT License](https://opensource.org/licenses/MIT).\n\n# Credits\n* [.gitignore](https://github.com/github/gitignore) from Github.\n* [AWS Lambda Powertools](https://awslabs.github.io/aws-lambda-powertools-python/2.10.0/) by Amazon.\n\n&copy; Crossref 2023\n",
    "bugtrack_url": null,
    "license": "Copyright &copy; 2023 Crossref  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "The Crossref Labs AWS tooling system.",
    "version": "0.0.21",
    "project_urls": {
        "Homepage": "https://gitlab.com/crossref/labs/distrunner",
        "changelog": "https://gitlab.com/crossref/labs/claws/-/blob/main/CHANGELOG.md",
        "documentation": "https://labs.crossref.org",
        "homepage": "https://labs.crossref.org",
        "repository": "https://gitlab.com/crossref/labs/claws"
    },
    "split_keywords": [
        "distributed",
        "computing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "29d49cbc2c2bc0ed1b4964997d9769ffdc659ead369251d4799e2631731eb01a",
                "md5": "808a0c695e9cd439d93bef1edc99799a",
                "sha256": "6ec3c9a11f9c2597445c83a652c5db768c5da7192adb5b64931ebaf533080ce0"
            },
            "downloads": -1,
            "filename": "claws-0.0.21-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "808a0c695e9cd439d93bef1edc99799a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7335,
            "upload_time": "2024-01-15T15:20:39",
            "upload_time_iso_8601": "2024-01-15T15:20:39.697390Z",
            "url": "https://files.pythonhosted.org/packages/29/d4/9cbc2c2bc0ed1b4964997d9769ffdc659ead369251d4799e2631731eb01a/claws-0.0.21-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9706d1ff0b9db513b3fd6ee0d7ba62a910fc244cf07563fe7c95130c55c4abc",
                "md5": "584f3134859caaf267fde477e38392ab",
                "sha256": "9c82cf0b093f72c729c7c27e39625423525a7b6e532c59e44f8784938609ce08"
            },
            "downloads": -1,
            "filename": "claws-0.0.21.tar.gz",
            "has_sig": false,
            "md5_digest": "584f3134859caaf267fde477e38392ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11306,
            "upload_time": "2024-01-15T15:20:42",
            "upload_time_iso_8601": "2024-01-15T15:20:42.019270Z",
            "url": "https://files.pythonhosted.org/packages/e9/70/6d1ff0b9db513b3fd6ee0d7ba62a910fc244cf07563fe7c95130c55c4abc/claws-0.0.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-15 15:20:42",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "crossref",
    "gitlab_project": "labs",
    "lcname": "claws"
}
        
Elapsed time: 0.32280s