{"id":18577912,"url":"https://github.com/gnucoop/pandino","last_synced_at":"2025-04-10T10:30:55.494Z","repository":{"id":255088921,"uuid":"848503777","full_name":"gnucoop/pandino","owner":"gnucoop","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-03T16:17:08.000Z","size":109,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-03T17:27:30.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnucoop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-27T22:11:26.000Z","updated_at":"2025-03-27T10:05:12.000Z","dependencies_parsed_at":"2024-10-27T15:39:51.977Z","dependency_job_id":"73cb53a5-0b5f-4b25-baba-48d518108cd1","html_url":"https://github.com/gnucoop/pandino","commit_stats":null,"previous_names":["tulas75/pandino","gnucoop/pandino"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnucoop%2Fpandino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnucoop%2Fpandino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnucoop%2Fpandino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnucoop%2Fpandino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnucoop","download_url":"https://codeload.github.com/gnucoop/pandino/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T23:32:00.360Z","updated_at":"2025-04-10T10:30:55.487Z","avatar_url":"https://github.com/gnucoop.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pandino\n\n## Overview\nPandino is a powerful tool designed to analyze and visualize data using various language models. It provides a flexible API for integrating different LLMs and processing data efficiently.\n\n## Features\n- Supports multiple LLM types including Groq, Deepseek, Mistral, and OpenAI.\n- Provides a Flask-based API for easy integration and usage.\n- Handles data processing and visualization using popular libraries like pandas and pandasai.\n- Implements a secure user management system using SQLite for API key validation.\n- Uses environment variables for secure storage of API keys and encryption keys.\n\n## Installation\nTo install Pandino, follow these steps:\n\n1. Clone the repository:\n   ```bash\n   git clone git@github.com:tulas75/pandino.git\n   cd pandino\n   ```\n\n2. Install the required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Set up environment variables:\n   Create a `.env` file in the project root and add the following variables:\n   ```\n   GROQ_API_KEY=your_groq_api_key\n   DEEPSEEK_API_KEY=your_deepseek_api_key\n   DEEPINFRA_API_KEY=your_deepinfra_api_key\n   MISTRAL_API_KEY=your_mistral_api_key\n   OPENAI_API_KEY=your_openai_api_key\n   ENCRYPTION_KEY=your_encryption_key_for_database\n   ```\n\n## Troubleshooting\nIf you encounter any issues during installation or usage, please check the following:\n\n- Ensure all environment variables are correctly set in the `.env` file.\n- Verify that all required dependencies are installed by running `pip install -r requirements.txt` again.\n- If you encounter issues with API keys, ensure they are valid and not expired.\n\n## Usage\n\n### User Management with SQLite or Postgres (Use database\\_sqlite.py or database\\_pg.py accordingly with your choice)\nPandino includes a secure user management system using SQLite and Postgres. The system allows you to add users and their API keys to the database.\n\n#### Initializing the Database\nTo initialize the SQLite database, use the following command:\n```bash\npython database_sqlite.py init_db\n```\n\n#### Adding Users\nTo add a new user to the database:\n```bash\npython database_sqlite.py add_user \u003cusername\u003e \u003capi_key\u003e\n```\n\n#### Listing Users\nTo list all users in the database:\n```bash\npython database_sqlite.py list_users\n```\n\n#### Viewing Stored API Keys\nTo view all stored (encrypted) API keys:\n```bash\npython database_sqlite.py print_keys\n```\n\n### Running the Pandino API Service\nTo run the Pandino API service, use the following command:\n```bash\npython main.py\n```\n\n### Accessing the API\nTo access the `/startdatachat` endpoint using `curl`, use the following command:\n```bash\ncurl -X POST \"http://127.0.0.1:5000/startdatachat\" \\\n     -H \"Content-Type: multipart/form-data\" \\\n     -H \"X-API-KEY: your_api_key_here\" \\\n     -H \"X-USER-NAME: your_full_user_name_here\" \\  \n     -F \"model_name=llama-3.1-70b-versatile\"\n     -F \"llm_type=Groq\"\n     -F \"file=your_local_csv\"\n     \n# curl -X POST \"http://127.0.0.1:5000/startdatachat\" \\\n#      -H \"Content-Type: multipart/form-data\" \\\n#      -H \"X-API-KEY: your_api_key_here\" \\\n#      -H \"X-USER-NAME: your_full_user_name_here\" \\\n#      -d '{\n#          \"model_name\": \"llama-3.1-70b-versatile\",\n#          \"llm_type\": \"Groq\",\n#          \"file\": your_csv\n#      }'\n```\n\nTo access the `/enddatachat` endpoint using `curl`, use the following command:\n```bash\ncurl -X POST \"http://127.0.0.1:5000/enddatachat\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"X-API-KEY: your_api_key_here\" \\\n     -H \"X-USER-NAME: your_full_user_name_here\" \\\n     -d '{}'\n```\n\nTo access the `/datachat` endpoint using `curl`, use the following command:\n```bash\ncurl -X POST \"http://127.0.0.1:5000/datachat\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"X-API-KEY: your_api_key_here\" \\\n     -d '{\n         \"chat\": your_request_to_pandas_here\n     }'\n```\n\nReplace `your_api_key_here` with a valid API key from the database, `your_full_user_name_here` with a user name (it will be used to create the agent dedicated export folder), `your_request_to_pandas_here` with your natural language request to Pandas and adjust the `model_name`, `llm_type`, and `data` fields as needed.\n\n## Contributing\nContributions are welcome! Please read the [contributing guidelines](CONTRIBUTING.md) before getting started. To report bugs or suggest features, please open an issue on the GitHub repository.\n\n## License\nThis project is licensed under the GPLv3 License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnucoop%2Fpandino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnucoop%2Fpandino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnucoop%2Fpandino/lists"}