Skip to content

This repository represents my solution to a challenge which involved generating a shared-object using Cython to handle CSVs

License

Notifications You must be signed in to change notification settings

GuilhermeCAz/pylibcsv

Repository files navigation

libcsv

License: MIT Python Version from PEP 621 TOML Pytest Docker Make Ruff Checked with mypy

Overview

This project demonstrates an efficient integration of Python and C (using Cython) for building a shared library for CSV processing, developed as part of a code challenge in a recruitment process.

The original challenge contained the Dockerfile, libcsv.h and test_libcsv files. These files should not be modified. Instead, the build.sh script should contain the steps to build a shared object, containing functions declared in libcsv.h.

test_libcsv was an ELF executable containing a single test to verify if the shared object was loaded correctly. The company requested not to share it (nor the challenge requirements) for security reasons. As such, the original docker run command is now invalid.

Installation and Execution

  1. Build the Docker image (make build):

    docker build -t libcsv .
  2. Run the Docker image (no longer valid) (make run):

    docker run -it libcsv
  3. Execute Python tests (make tests):

    docker run -it libcsv /bin/sh -c "source /app/.venv/bin/activate && pytest"

About

This repository represents my solution to a challenge which involved generating a shared-object using Cython to handle CSVs

Topics

Resources

License

Stars

Watchers

Forks