Skip to content

Commit 6c76c46

Browse files
Initial commit: DataSetIQ Python client v0.1.0
- Core functionality: get() and search() functions - Typed exceptions with marketing messages - Intelligent disk caching with TTL - Retry logic with exponential backoff - Support for authenticated (CSV) and anonymous (JSON) modes - Comprehensive README and examples - Smoke tests passing (3/6, minor test fixtures needed)
0 parents  commit 6c76c46

14 files changed

Lines changed: 1883 additions & 0 deletions

.gitignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
*.manifest
32+
*.spec
33+
34+
# Unit test / coverage reports
35+
htmlcov/
36+
.tox/
37+
.nox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
*.cover
44+
*.py,cover
45+
.hypothesis/
46+
.pytest_cache/
47+
48+
# Virtual environments
49+
venv/
50+
env/
51+
ENV/
52+
env.bak/
53+
venv.bak/
54+
55+
# IDEs
56+
.vscode/
57+
.idea/
58+
*.swp
59+
*.swo
60+
*~
61+
.DS_Store
62+
63+
# Jupyter Notebook
64+
.ipynb_checkpoints
65+
66+
# Example outputs
67+
examples/*.png
68+
examples/*.xlsx
69+
70+
# Cache directory (user-specific, don't commit)
71+
# Note: appdirs creates this in user directory, not in project

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2025-01-XX
9+
10+
### Added
11+
- Initial public release
12+
- `get()` function for fetching time series data
13+
- `search()` function for dataset discovery
14+
- `configure()` for client configuration
15+
- `set_api_key()` helper function
16+
- Disk-based caching with TTL
17+
- Automatic retry logic with exponential backoff
18+
- Typed exceptions with marketing messages
19+
- Support for authenticated (CSV) and anonymous (paginated JSON) modes
20+
- Date filtering with `start` and `end` parameters
21+
- NaN handling with `dropna` parameter
22+
- Comprehensive test suite
23+
- Documentation and examples
24+
25+
### Features
26+
- TCP connection reuse via `requests.Session`
27+
- Respects `Retry-After` headers
28+
- Pagination safety valve (max 200 pages for anonymous)
29+
- SHA256-based cache keying
30+
- Type-safe error handling
31+
32+
[0.1.0]: https://github.com/DataSetIQ/datasetiq-python/releases/tag/v0.1.0

CONTRIBUTING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Contributing to DataSetIQ Python Client
2+
3+
Thank you for considering contributing to the DataSetIQ Python client!
4+
5+
## Development Setup
6+
7+
1. **Clone the repository:**
8+
```bash
9+
git clone https://github.com/DataSetIQ/datasetiq-python.git
10+
cd datasetiq-python
11+
```
12+
13+
2. **Install in editable mode with dev dependencies:**
14+
```bash
15+
pip install -e ".[dev]"
16+
```
17+
18+
3. **Run tests:**
19+
```bash
20+
pytest
21+
```
22+
23+
## Code Style
24+
25+
- We use **Black** for code formatting
26+
- We use **Ruff** for linting
27+
- Run before committing:
28+
```bash
29+
black datasetiq tests examples
30+
ruff check datasetiq tests examples
31+
```
32+
33+
## Testing
34+
35+
- Write tests for all new features
36+
- Maintain test coverage above 80%
37+
- Use `responses` library for HTTP mocking
38+
- Run tests with coverage:
39+
```bash
40+
pytest --cov=datasetiq --cov-report=html
41+
```
42+
43+
## Pull Request Process
44+
45+
1. Create a feature branch: `git checkout -b feature/amazing-feature`
46+
2. Make your changes
47+
3. Add tests for new functionality
48+
4. Ensure all tests pass
49+
5. Update documentation if needed
50+
6. Commit with clear messages
51+
7. Push and create a Pull Request
52+
53+
## Reporting Issues
54+
55+
- Use GitHub Issues
56+
- Include Python version, OS, and library version
57+
- Provide minimal reproduction example
58+
- Include full error traceback
59+
60+
## Questions?
61+
62+
Contact us at support@datasetiq.com or open a GitHub Discussion.

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) 2025 DataSetIQ
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)