Datachain is a comprehensive project that includes a Python package for backend operations and a Django application for the frontend. The backend provides classes and helper functions for interacting with a PostgreSQL database. The frontend is a boilerplate UI for the chatbot,
The backend provides the following key features:
- Establishing a connection to a PostgreSQL database.
- Creating tables based on provided table names and CSV data.
- Executing SQL queries.
- Inserting data from CSV files into specified tables.
- Fetching data from tables.
- Deleting tables from the database.
The frontend is a Django application with the following views:
index
: Renders the main page.database_tables
: Fetches and displays the list of tables in the database.view_table
: Fetches and displays the data from a selected table.query_page
: Allows users to execute SQL queries and view the results.
datachain_backend
already comes preinstalled as dependency on the frontend. If you want to install and use the package in your project:
- Clone the repository:
git clone https://github.com/calapsss/datachain.git
- Navigate to
dist
directory:cd datachain/datachain-backend/dist/datachain_backend-0.1.0-py3-none-any.whl
- You can install the package
pip install datachain_backend-0.1.0-py3-none-any.whl
andpip install datachain_backend-0.1.0-py3-none-any.tar.gz
To check the how it works with datachain_frontend
:
- Clone the repository:
git clone https://github.com/calapsss/datachain.git
- Navigate to the project directory:
cd datachain\datachain-frontend
- Install the Python package dependencies using Poetry:
poetry install
- Run with Poetry:
poetry run python manage.py runserver 8080
- [Additional installation steps, if any]
To use the project, follow these steps:
- Start the Django Server:
poetry run python manage.py runserver 8080
- Visit
localhost:8000
in your web browser to view the application.
We welcome contributions from the community. To contribute to the project, please follow these guidelines:
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature
- Make your changes and commit them:
git commit -m 'Add your changes'
- Push to the branch:
git push origin feature/your-feature
- Submit a pull request
This project is licensed under the MIT. See the LICENSE file for more details.
For any inquiries or questions, please contact the project maintainer at [email protected].
- Chat handler function
- Internal code interpreter
- Add unit tests for backend operations.
- Improve error handling in the frontend views.
- Implement user authentication and authorization.
- Refactor code for better modularity.