Skip to content

Commit 90202cc

Browse files
authored
Merge pull request #16 from paywithextend/development
Release 1.0.0
2 parents b7c3f05 + d3f1605 commit 90202cc

32 files changed

+3430
-0
lines changed

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Extend API Credentials
2+
EXTEND_API_KEY=your_api_key_here
3+
EXTEND_API_SECRET=your_api_secret_here
4+
5+
# Test Configuration
6+
EXTEND_TEST_RECIPIENT=recipient@example.com
7+
EXTEND_TEST_CARDHOLDER=cardholder@example.com

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.env export-ignore
2+
.git export-ignore
3+
.idea export-ignore
4+
.pytest_cache export-ignore
5+
.venv export-ignore
6+
venv export-ignore
7+
dist export-ignore

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
* @paywithextend/backend-guild @paywithextend/platform @paywithextend/team-core-services

.github/pull_request_template.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## What is this PR doing?
2+
3+
> Brief description of the changes in this pull request. Include the purpose and high level overview.
4+
5+
## Why do we need these changes?
6+
7+
> Explain the reasoning behind these changes (feature, bug-fix, performance improvement, etc)
8+
9+
## Additional Notes
10+
11+
> Anything else you would like to note here.

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release Stage Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: 3.11
23+
24+
- name: Install dependencies
25+
run: sudo apt-get install make
26+
27+
- name: Create virtual environment
28+
run: make venv
29+
30+
- name: Build package
31+
run: |
32+
set -x
33+
source venv/bin/activate
34+
rm -rf build dist *.egg-info
35+
make build ENV=stage
36+
37+
- name: Extract Version from pyproject.toml
38+
id: get_version
39+
run: |
40+
# Extract the version assuming a line like: version = "0.1.0"
41+
VERSION=$(grep -Po '^version\s*=\s*"\K[^"]+' pyproject.toml)
42+
echo "Version extracted: $VERSION"
43+
echo "version=$VERSION" >> $GITHUB_OUTPUT
44+
45+
- name: Create GitHub Release
46+
id: create_release
47+
uses: actions/create-release@v1
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
tag_name: v${{ steps.get_version.outputs.version }}
52+
release_name: v${{ steps.get_version.outputs.version }}
53+
draft: false
54+
prerelease: false
55+
56+
- name: Install Twine
57+
run: |
58+
source venv/bin/activate
59+
pip install twine
60+
61+
- name: Upload to PyPI
62+
env:
63+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
64+
run: |
65+
source venv/bin/activate
66+
twine upload dist/* -u __token__ -p $PYPI_API_TOKEN

.gitignore

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Python build artifacts
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
23+
# Virtual environments
24+
venv/
25+
env/
26+
ENV/
27+
test_env/
28+
.env
29+
30+
# IDE specific files
31+
.idea/
32+
.vscode/
33+
*.swp
34+
*.swo
35+
.DS_Store
36+
37+
# Test coverage
38+
.coverage
39+
htmlcov/
40+
.tox/
41+
.nox/
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Jupyter Notebook
51+
.ipynb_checkpoints
52+
53+
54+
# Distribution / packaging
55+
.Python
56+
build/
57+
develop-eggs/
58+
dist/
59+
downloads/
60+
eggs/
61+
.eggs/
62+
lib/
63+
lib64/
64+
parts/
65+
sdist/
66+
var/
67+
wheels/
68+
share/python-wheels/
69+
*.egg-info/
70+
.installed.cfg
71+
*.egg
72+
MANIFEST

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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] - 2024-03-24
9+
10+
### Added
11+
- Initial release
12+
- Basic virtual card operations (create, get, update, cancel, close)
13+
- Recurring card support
14+
- Transaction listing and filtering
15+
- Comprehensive test suite (unit and integration tests)
16+
- Jupyter notebook examples
17+
- Type hints and validation
18+
- Async/await support
19+
20+
### Changed
21+
- None (initial release)
22+
23+
### Deprecated
24+
- None (initial release)
25+
26+
### Removed
27+
- None (initial release)
28+
29+
### Fixed
30+
- None (initial release)
31+
32+
### Security
33+
- None (initial release)

CONTRIBUTING.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Contributing to Extend API Client
2+
3+
Thank you for your interest in contributing to the Extend API Client! This document provides guidelines and steps for contributing.
4+
5+
## Development Setup
6+
7+
1. Fork the repository
8+
2. Clone your fork:
9+
```bash
10+
git clone https://github.com/your-username/extend-python.git
11+
cd extend-python
12+
```
13+
3. Create a virtual environment and activate it:
14+
```bash
15+
python -m venv venv
16+
source venv/bin/activate # On Windows: venv\Scripts\activate
17+
```
18+
4. Install development dependencies:
19+
```bash
20+
pip install -e ".[dev]"
21+
```
22+
23+
## Code Style
24+
25+
This project uses:
26+
- [black](https://github.com/psf/black) for code formatting
27+
- [isort](https://github.com/pycqa/isort) for import sorting
28+
29+
Before submitting a PR, please run:
30+
```bash
31+
black .
32+
isort .
33+
```
34+
35+
## Testing
36+
37+
We have two types of tests:
38+
1. Unit tests (`tests/test_client.py`)
39+
2. Integration tests (`tests/test_integration.py`)
40+
41+
Run all tests:
42+
```bash
43+
pytest
44+
```
45+
46+
Run only unit tests:
47+
```bash
48+
pytest tests/test_client.py
49+
```
50+
51+
Run only integration tests:
52+
```bash
53+
pytest tests/test_integration.py
54+
```
55+
56+
### Integration Tests
57+
58+
Integration tests require environment variables:
59+
- `EXTEND_API_KEY`
60+
- `EXTEND_API_SECRET`
61+
- `EXTEND_TEST_RECIPIENT`
62+
- `EXTEND_TEST_CARDHOLDER`
63+
64+
## Pull Request Process
65+
66+
1. Create a new branch for your feature:
67+
```bash
68+
git checkout -b feature/your-feature-name
69+
```
70+
71+
2. Make your changes and commit them:
72+
```bash
73+
git commit -m "Description of your changes"
74+
```
75+
76+
3. Push to your fork:
77+
```bash
78+
git push origin feature/your-feature-name
79+
```
80+
81+
4. Create a Pull Request from your fork to the main repository
82+
83+
## Code Review Guidelines
84+
85+
- Ensure all tests pass
86+
- Follow the existing code style
87+
- Add tests for new functionality
88+
- Update documentation as needed
89+
- Keep commits focused and atomic
90+
91+
## Documentation
92+
93+
- Update the README.md if you add new features
94+
- Add docstrings to new functions and classes
95+
- Update the CHANGELOG.md with your changes
96+
97+
## Questions?
98+
99+
If you have any questions, feel free to:
100+
1. Open an issue
101+
2. Contact the maintainers
102+
3. Check the [Extend API Documentation](https://docs.extend.com)
103+
104+
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) 2025 Extend Enterprises, LLC
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.

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export ENV ?= stage
2+
VENV_NAME ?= venv
3+
PIP ?= pip
4+
PYTHON ?= python3.11
5+
6+
venv: $(VENV_NAME)/bin/activate
7+
8+
$(VENV_NAME)/bin/activate: pyproject.toml
9+
@test -d $(VENV_NAME) || $(PYTHON) -m venv $(VENV_NAME)
10+
$(VENV_NAME)/bin/python -m pip install -e .
11+
@touch $(VENV_NAME)/bin/activate
12+
13+
test: venv
14+
$(VENV_NAME)/bin/python -m unittest discover tests
15+
16+
build: venv
17+
cp LICENSE LICENSE.bak
18+
$(VENV_NAME)/bin/python -m build
19+
rm LICENSE.bak

0 commit comments

Comments
 (0)