Skip to main content

Tools to support Kata's work.

Project description

RaRa Tools

Py3.10 Py3.11 Py3.12

rara-tools is a Python library containing various generic tools used by components of Kata.


✨ Features

  • Elasticsearch index & document operations
  • S3 file management operations
  • Task reporting to Core API
  • Converting SIERRA API responses to Pymarc compatible JSON

⚡ Quick Start

Get started with rara-tools in just a few steps:

  1. Install the Package
    Ensure you're using Python 3.10 or above, then run:

    pip install rara-tools
    
  2. Import and Use
    Example usage to download a folder from S3:

    from rara_tools.s3 import S3Files
    
    s3 = S3Files(
         url="your-s3-address",
         access_key = "xxx",
         secret_key = "yyy",
         bucket = "my-sad-bucket"
    )
    
    s3.download("my-folder-in-s3")
    

⚙️ Installation Guide

Follow the steps below to install the rara-tools package, either via pip or locally.


Installation via pip

Click to expand
  1. Set Up Your Python Environment
    Create or activate a Python environment using Python 3.10 or above.

  2. Install the Package
    Run the following command:

    pip install rara-tools
    

Local Installation

Follow these steps to install the rara-tools package locally:

Click to expand
  1. Clone the Repository
    Clone the repository and navigate into it:

    git clone <repository-url>
    cd <repository-directory>
    
  2. Set Up Python Environment
    Create or activate a Python environment using Python 3.10 or above. E.g:

    conda create -n py310 python==3.10
    conda activate py310
    
  3. Install Build Package
    Install the build package to enable local builds:

    pip install build
    
  4. Build the Package
    Run the following command inside the repository:

    python -m build
    
  5. Install the Package
    Install the built package locally:

    pip install .
    

🚀 Testing Guide

Follow these steps to test the rara-tools package.

How to Test

Click to expand
  1. Clone the Repository
    Clone the repository and navigate into it:

    git clone <repository-url>
    cd <repository-directory>
    
  2. Set Up Python Environment
    Create or activate a Python environment using Python 3.10 or above.

  3. Install Build Package
    Install the build package:

    pip install build
    
  4. Build the Package
    Build the package inside the repository:

    python -m build
    
  5. Install with Testing Dependencies
    Install the package along with its testing dependencies:

    pip install .[testing]
    
  6. Run Tests
    Run the test suite from the repository root:

    python -m pytest -v tests
    

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

rara_tools-0.6.15.tar.gz (62.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rara_tools-0.6.15-py3-none-any.whl (66.7 kB view details)

Uploaded Python 3

File details

Details for the file rara_tools-0.6.15.tar.gz.

File metadata

  • Download URL: rara_tools-0.6.15.tar.gz
  • Upload date:
  • Size: 62.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for rara_tools-0.6.15.tar.gz
Algorithm Hash digest
SHA256 694dd85511461eea59f72bb70f4df0719efe7d067cce08e73aea66ae81f701e6
MD5 a3e83793215e7c30a62a81a6a4213c2c
BLAKE2b-256 14c25829f35d1a39ce8fc1c8ccbaf11b6115bc39f53ee0a6d90ab85f5f8ec7e7

See more details on using hashes here.

File details

Details for the file rara_tools-0.6.15-py3-none-any.whl.

File metadata

  • Download URL: rara_tools-0.6.15-py3-none-any.whl
  • Upload date:
  • Size: 66.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for rara_tools-0.6.15-py3-none-any.whl
Algorithm Hash digest
SHA256 e9536523182f6343faac1bc5f8097aabc92d5d52b5401fd587d0091e85243415
MD5 576a966bab00b80a3ff3a2e34b9060d2
BLAKE2b-256 eec13f33cab73f4b2b983f40817c4ca8cd7dd6487f588e4aa91dfc7bb5e2a7ec

See more details on using hashes here.

Supported by

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