polars-access-mdbtools


Namepolars-access-mdbtools JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryA library for reading tables from an Access database into Polars dataframes, using mdbtools
upload_time2024-04-17 04:26:22
maintainerNone
docs_urlNone
authorDeflateAwesome
requires_python>=3.8
licenseNone
keywords access database dataframe mdbtools polars
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # polars_access_mdbtools
A library for reading tables from an Access database into Polars dataframes, using mdbtools

## What is this?

A tiny, `subprocess`-based tool for reading a 
[MS Access](https://products.office.com/en-us/access) 
database (`.rdb`) as a [Python Polars Dataframe](https://docs.pola.rs).

## Installation

To read the database, this package thinly wraps 
[MDBTools](https://github.com/mdbtools/mdbtools).

If you are on `OSX`, install it via [Homebrew](http://brew.sh/):

```sh
$ brew install mdbtools
```

If you are on `Debian`, install it via apt:
```sh
$ sudo apt install mdbtools
```

If you are on `Windows`, it's a little tougher. Install `mdbtools` for [Windows](https://github.com/lsgunth/mdbtools-win). Manually add to PATH.
1. Download the mdb-tools files from Windows link above. Visit the Releases section, then downloadi the part that says "Source Code (zip)".
2. Extract that to somewhere like `C:/bin/mdbtools-win/mdbtools-win-1.0.0`.
3. Follow these instructions to [add that folder to your environment path](https://linuxhint.com/add-directory-to-path-environment-variables-windows/) (Method 1, but use the path to the mdbtools executable files).
4. Restart your computer or just close and re-open the program you're running it from. You can test that it works by opening a terminal and running `mdb-tables --help` and see that it doesn't fail.

Finally, on all OS's:
```sh
$ pip install polars_access_mdbtools
```

## Example Usage

```python
import polars as pl
import polars_access_mdbtools as pl_access

file_path = 'path_to_file.mdb'
pl_access.list_table_names(file_path)

df = pl_access.read_table(file_path, table_name='your_table_name')

```

## Acknowledgements

This code is based heavily on [jbn's `pandas_access` library](https://github.com/jbn/pandas_access).

## To Do

- [ ] unit tests
- [ ] better error messages when subsections (e.g., schema fetching) fail

## Contributing

Please Star this repo. 

Please submit bug reports as GitHub Issues. Feel free to submit a PR to fix an issue!


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "polars-access-mdbtools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "access, database, dataframe, mdbtools, polars",
    "author": "DeflateAwesome",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/87/dd/d341212504e6f0d79b5298538b7af21ec0b43f90d63e97839be9d486e878/polars_access_mdbtools-0.0.2.tar.gz",
    "platform": null,
    "description": "# polars_access_mdbtools\nA library for reading tables from an Access database into Polars dataframes, using mdbtools\n\n## What is this?\n\nA tiny, `subprocess`-based tool for reading a \n[MS Access](https://products.office.com/en-us/access) \ndatabase (`.rdb`) as a [Python Polars Dataframe](https://docs.pola.rs).\n\n## Installation\n\nTo read the database, this package thinly wraps \n[MDBTools](https://github.com/mdbtools/mdbtools).\n\nIf you are on `OSX`, install it via [Homebrew](http://brew.sh/):\n\n```sh\n$ brew install mdbtools\n```\n\nIf you are on `Debian`, install it via apt:\n```sh\n$ sudo apt install mdbtools\n```\n\nIf you are on `Windows`, it's a little tougher. Install `mdbtools` for [Windows](https://github.com/lsgunth/mdbtools-win). Manually add to PATH.\n1. Download the mdb-tools files from Windows link above. Visit the Releases section, then downloadi the part that says \"Source Code (zip)\".\n2. Extract that to somewhere like `C:/bin/mdbtools-win/mdbtools-win-1.0.0`.\n3. Follow these instructions to [add that folder to your environment path](https://linuxhint.com/add-directory-to-path-environment-variables-windows/) (Method 1, but use the path to the mdbtools executable files).\n4. Restart your computer or just close and re-open the program you're running it from. You can test that it works by opening a terminal and running `mdb-tables --help` and see that it doesn't fail.\n\nFinally, on all OS's:\n```sh\n$ pip install polars_access_mdbtools\n```\n\n## Example Usage\n\n```python\nimport polars as pl\nimport polars_access_mdbtools as pl_access\n\nfile_path = 'path_to_file.mdb'\npl_access.list_table_names(file_path)\n\ndf = pl_access.read_table(file_path, table_name='your_table_name')\n\n```\n\n## Acknowledgements\n\nThis code is based heavily on [jbn's `pandas_access` library](https://github.com/jbn/pandas_access).\n\n## To Do\n\n- [ ] unit tests\n- [ ] better error messages when subsections (e.g., schema fetching) fail\n\n## Contributing\n\nPlease Star this repo. \n\nPlease submit bug reports as GitHub Issues. Feel free to submit a PR to fix an issue!\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A library for reading tables from an Access database into Polars dataframes, using mdbtools",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/DeflateAwning/polars_access_mdbtools",
        "Issues": "https://github.com/DeflateAwning/polars_access_mdbtools/issues",
        "License": "https://github.com/DeflateAwning/polars_access_mdbtools/blob/main/LICENSE"
    },
    "split_keywords": [
        "access",
        " database",
        " dataframe",
        " mdbtools",
        " polars"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe4fd28ac26328b4efe659214c3490c03c6e313f039afa2d9f2d3d8994c91b90",
                "md5": "a5dbfca2cfecda3527ac1ad3440305be",
                "sha256": "f1898df17389efc0631eeca184b99dd6eb0f0f7bd5323459cecce10c773fb360"
            },
            "downloads": -1,
            "filename": "polars_access_mdbtools-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a5dbfca2cfecda3527ac1ad3440305be",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5829,
            "upload_time": "2024-04-17T04:26:20",
            "upload_time_iso_8601": "2024-04-17T04:26:20.846702Z",
            "url": "https://files.pythonhosted.org/packages/fe/4f/d28ac26328b4efe659214c3490c03c6e313f039afa2d9f2d3d8994c91b90/polars_access_mdbtools-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87ddd341212504e6f0d79b5298538b7af21ec0b43f90d63e97839be9d486e878",
                "md5": "cdf3714ad63f38da2ac83ce5ec3243e7",
                "sha256": "2cef4bd829fb77e33ad96cfb1c683312cf1f00efe42fcdd2fd4af3a551d111ef"
            },
            "downloads": -1,
            "filename": "polars_access_mdbtools-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "cdf3714ad63f38da2ac83ce5ec3243e7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6611,
            "upload_time": "2024-04-17T04:26:22",
            "upload_time_iso_8601": "2024-04-17T04:26:22.506560Z",
            "url": "https://files.pythonhosted.org/packages/87/dd/d341212504e6f0d79b5298538b7af21ec0b43f90d63e97839be9d486e878/polars_access_mdbtools-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-17 04:26:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DeflateAwning",
    "github_project": "polars_access_mdbtools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "polars-access-mdbtools"
}
        
Elapsed time: 0.33941s