Skip to content

Commit ad80920

Browse files
Copilotlurenss
andcommitted
Implement core ScrapeGraphAI SDK integration with Elasticsearch
Co-authored-by: lurenss <[email protected]>
1 parent fb009bf commit ad80920

File tree

16 files changed

+1586
-2
lines changed

16 files changed

+1586
-2
lines changed

.env.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Elasticsearch Configuration
2+
ELASTICSEARCH_HOST=localhost
3+
ELASTICSEARCH_PORT=9200
4+
ELASTICSEARCH_SCHEME=http
5+
ELASTICSEARCH_USERNAME=elastic
6+
ELASTICSEARCH_PASSWORD=changeme
7+
8+
# ScrapeGraphAI Configuration
9+
SCRAPEGRAPHAI_API_KEY=your_api_key_here
10+
11+
# Optional: OpenAI API Key for LLM functionality
12+
OPENAI_API_KEY=your_openai_api_key_here

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
env/
8+
venv/
9+
ENV/
10+
build/
11+
develop-eggs/
12+
dist/
13+
downloads/
14+
eggs/
15+
.eggs/
16+
lib/
17+
lib64/
18+
parts/
19+
sdist/
20+
var/
21+
wheels/
22+
*.egg-info/
23+
.installed.cfg
24+
*.egg
25+
26+
# Environment
27+
.env
28+
29+
# IDEs
30+
.vscode/
31+
.idea/
32+
*.swp
33+
*.swo
34+
*~
35+
36+
# Logs
37+
*.log
38+
39+
# OS
40+
.DS_Store
41+
Thumbs.db
42+
43+
# Data
44+
data/
45+
*.csv
46+
*.json

CONTRIBUTING.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Contributing to ScrapeGraphAI Elasticsearch Demo
2+
3+
Thank you for your interest in contributing to this project! We welcome contributions from the community.
4+
5+
## How to Contribute
6+
7+
### Reporting Bugs
8+
9+
If you find a bug, please open an issue on GitHub with:
10+
- A clear, descriptive title
11+
- Steps to reproduce the bug
12+
- Expected behavior
13+
- Actual behavior
14+
- Your environment (OS, Python version, etc.)
15+
16+
### Suggesting Enhancements
17+
18+
We welcome suggestions for new features or improvements. Please open an issue with:
19+
- A clear description of the enhancement
20+
- Use cases and benefits
21+
- Any relevant examples or mockups
22+
23+
### Pull Requests
24+
25+
1. Fork the repository
26+
2. Create a new branch for your feature (`git checkout -b feature/amazing-feature`)
27+
3. Make your changes
28+
4. Ensure code follows the existing style
29+
5. Test your changes thoroughly
30+
6. Commit your changes (`git commit -m 'Add amazing feature'`)
31+
7. Push to your branch (`git push origin feature/amazing-feature`)
32+
8. Open a Pull Request
33+
34+
### Code Style
35+
36+
- Follow PEP 8 guidelines for Python code
37+
- Use type hints where appropriate
38+
- Add docstrings to functions and classes
39+
- Keep functions focused and concise
40+
- Write descriptive variable and function names
41+
42+
### Testing
43+
44+
- Test your changes with both mock data and real data (if applicable)
45+
- Ensure Elasticsearch integration works correctly
46+
- Test with different Python versions if possible
47+
48+
### Documentation
49+
50+
- Update README.md if you add new features
51+
- Add docstrings to new functions and classes
52+
- Update examples if needed
53+
- Keep documentation clear and concise
54+
55+
## Development Setup
56+
57+
```bash
58+
# Clone your fork
59+
git clone https://github.com/your-username/scrapegraph-elasticsearch-demo.git
60+
cd scrapegraph-elasticsearch-demo
61+
62+
# Create virtual environment
63+
python -m venv venv
64+
source venv/bin/activate # On Windows: venv\Scripts\activate
65+
66+
# Install dependencies
67+
pip install -r requirements.txt
68+
69+
# Start Elasticsearch
70+
docker-compose up -d
71+
72+
# Run examples to test
73+
python examples/basic_usage.py
74+
```
75+
76+
## Questions?
77+
78+
If you have questions, feel free to:
79+
- Open an issue on GitHub
80+
- Check existing issues and discussions
81+
- Review the documentation
82+
83+
Thank you for contributing! 🎉

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 ScrapeGraphAI
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)