Metadata-Version: 2.1
Name: pandalchemy
Version: 0.0.4
Summary: A package that integrates pandas and sqlaclhemy.
Home-page: https://github.com/eddiethedean/pandalchemy
Author: Odos Matthews
Author-email: odosmatthews@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: sqlalchemy (==1.3.18)
Requires-Dist: sqlalchemy-migrate
Requires-Dist: sqlacodegen
Requires-Dist: numpy


# pandalchemy: an intuitive combination of pandas and sqlalchemy to manipulate databases with pandas

## What is it?

**pandalchemy** is a Python package that lets Data Scientists create and manipulte databases with the pandas package 
that they know and love without needing to learn the ins and outs of sqlalchemy.

## Main Features
Here are just a few of the things that pandaclehmy does:

  - Pulls down any sql table with sqlalchemy and maintains all data types, keys, and indexes
    when you make your changes.
  - Adds a primary key to a new table, something pandas to_sql method does not do.
  - Add or delete columns in a database table thanks to sqlalchemy-migrate.

## Where to get it
The source code is currently hosted on GitHub at:
https://github.com/eddiethedean/pandalchemy

```sh
# PyPI
pip install pandalchemy
```

## Dependencies
- [pandas](https://pandas.pydata.org/)
- [sqlalchemy==1.3.18](https://pypi.org/project/SQLAlchemy/1.3.18/)
- [sqlacodegen](https://pypi.org/project/sqlalchemy-migrate/)
- [sqlalchemy-migrate](https://sqlalchemy-migrate.readthedocs.io/en/latest/)
- [numpy](https://numpy.org/)

# Example code
```sh
from sqlalchemy import create_engine 
import pandalchemy as ba 

# Use sqlalchemy to create an engine to connect to existing database 
engine = create_engine('postgresql://scott:tiger@localhost:5432/mydatabase') 

# Initialize a pandalchemy DataBase object 
db = ba.DataBase(engine) 

# Accessing a table by name gives you a DataFrame like Table object 
tbl = db['test_table'] 

# Make changes to the Table just like you would a pandas DataFrame 
tbl['age'] = [11, 12, 13, 14, 15] 

# Use the push method to push all your changes to your database 
db.push() 
```






