Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4db792a
chore: update README (#151)
stainless-bot Oct 12, 2023
acdfa12
refactor(test): refactor authentication tests (#153)
stainless-bot Oct 12, 2023
712448e
feat(client): add logging setup (#154)
stainless-bot Oct 12, 2023
9d757a1
fix(client): correctly handle arguments with env vars (#155)
stainless-bot Oct 12, 2023
1873cfe
ci: before first major release use a minor version update for feature…
stainless-bot Oct 12, 2023
9240b3a
chore: add case insensitive get header function (#157)
stainless-bot Oct 12, 2023
e75c268
chore: update comment (#158)
stainless-bot Oct 13, 2023
9b23b62
chore(internal): enable lint rule (#159)
stainless-bot Oct 13, 2023
7bad83f
fix(streaming): add additional overload for ambiguous stream param (#…
stainless-bot Oct 14, 2023
5325526
chore(internal): cleanup some redundant code (#161)
stainless-bot Oct 14, 2023
695f2bb
fix(client): accept io.IOBase instances in file params (#162)
stainless-bot Oct 16, 2023
bd21fa4
docs: organisation -> organization (UK to US English) (#163)
stainless-bot Oct 17, 2023
e105b17
docs: improve error message for invalid file param type (#164)
stainless-bot Oct 17, 2023
46c62ba
feat(api): add addenda details for ACH transfers (#165)
stainless-bot Oct 17, 2023
3e81c88
chore(internal): migrate from Poetry to Rye (#166)
stainless-bot Oct 17, 2023
3d98ab9
chore(internal): improve publish script (#167)
stainless-bot Oct 17, 2023
ba19c25
feat(client): support passing httpx.URL instances to base_url (#168)
stainless-bot Oct 17, 2023
65434e9
chore(internal): update lock file (#169)
stainless-bot Oct 18, 2023
7305ef9
chore(internal): update gitignore (#170)
stainless-bot Oct 18, 2023
ae01f6b
chore(internal): update gitignore (#171)
stainless-bot Oct 19, 2023
420092d
feat(api): updates (#172)
stainless-bot Oct 19, 2023
99f59c8
release: 0.14.0
stainless-bot Oct 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/create-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ jobs:
repo: ${{ github.event.repository.full_name }}
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

- name: Set up Python
- name: Install Rye
if: ${{ steps.release.outputs.releases_created }}
uses: actions/setup-python@v4
with:
python-version: '3.7'
run: |
curl -sSf https://rye-up.com/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: 0.15.2
RYE_INSTALL_OPTION: "--yes"

- name: Publish to PyPI
if: ${{ steps.release.outputs.releases_created }}
run: |
pipx install poetry
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.INCREASE_PYPI_TOKEN }}
12 changes: 7 additions & 5 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install Rye
run: |
curl -sSf https://rye-up.com/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: 0.15.2
RYE_INSTALL_OPTION: "--yes"

- name: Publish to PyPI
run: |
pipx install poetry
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.INCREASE_PYPI_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ __pycache__

dist

.venv
.idea

.env
.envrc
codegen.log
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.13.7"
".": "0.14.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 147
configured_endpoints: 148
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog

## 0.14.0 (2023-10-19)

Full Changelog: [v0.13.7...v0.14.0](https://github.com/increase/increase-python/compare/v0.13.7...v0.14.0)

### Features

* **api:** add addenda details for ACH transfers ([#165](https://github.com/increase/increase-python/issues/165)) ([46c62ba](https://github.com/increase/increase-python/commit/46c62bae4ca6684cfbfce0124101b8a556763b2d))
* **api:** updates ([#172](https://github.com/increase/increase-python/issues/172)) ([420092d](https://github.com/increase/increase-python/commit/420092d0e1b2a3a2fdcc75add256b266d87e31b1))
* **client:** add logging setup ([#154](https://github.com/increase/increase-python/issues/154)) ([712448e](https://github.com/increase/increase-python/commit/712448e48baa1b25b5b556ae0a9a68a239c3b88d))
* **client:** support passing httpx.URL instances to base_url ([#168](https://github.com/increase/increase-python/issues/168)) ([ba19c25](https://github.com/increase/increase-python/commit/ba19c25d98cf522779ce08509834158b1d1df505))


### Bug Fixes

* **client:** accept io.IOBase instances in file params ([#162](https://github.com/increase/increase-python/issues/162)) ([695f2bb](https://github.com/increase/increase-python/commit/695f2bba42968196b058b6ff6c6ad2ec66fb1da3))
* **client:** correctly handle arguments with env vars ([#155](https://github.com/increase/increase-python/issues/155)) ([9d757a1](https://github.com/increase/increase-python/commit/9d757a11276040923f22ef6155840ab3bbb8b635))
* **streaming:** add additional overload for ambiguous stream param ([#160](https://github.com/increase/increase-python/issues/160)) ([7bad83f](https://github.com/increase/increase-python/commit/7bad83fa5931974df2d8249a0fc98f3ea9d2d5de))


### Chores

* add case insensitive get header function ([#157](https://github.com/increase/increase-python/issues/157)) ([9240b3a](https://github.com/increase/increase-python/commit/9240b3a492872bc2740dd57573c947b3b5047a97))
* **internal:** cleanup some redundant code ([#161](https://github.com/increase/increase-python/issues/161)) ([5325526](https://github.com/increase/increase-python/commit/5325526dc4826a96a9f18ef95b2729d23842877d))
* **internal:** enable lint rule ([#159](https://github.com/increase/increase-python/issues/159)) ([9b23b62](https://github.com/increase/increase-python/commit/9b23b62b0ce84ba6b18a76e4121b971a42695c3b))
* **internal:** improve publish script ([#167](https://github.com/increase/increase-python/issues/167)) ([3d98ab9](https://github.com/increase/increase-python/commit/3d98ab9090ab87c40e0391d3bc80178e8d1c3483))
* **internal:** migrate from Poetry to Rye ([#166](https://github.com/increase/increase-python/issues/166)) ([3e81c88](https://github.com/increase/increase-python/commit/3e81c88e0fa8bf0e3feae148b99e6f4d335c98f5))
* **internal:** update gitignore ([#170](https://github.com/increase/increase-python/issues/170)) ([7305ef9](https://github.com/increase/increase-python/commit/7305ef97697154361747320e8b03fbfb29740ca3))
* **internal:** update gitignore ([#171](https://github.com/increase/increase-python/issues/171)) ([ae01f6b](https://github.com/increase/increase-python/commit/ae01f6b5225ab37a44751d93eafe6949c7dcf513))
* **internal:** update lock file ([#169](https://github.com/increase/increase-python/issues/169)) ([65434e9](https://github.com/increase/increase-python/commit/65434e9c8f9114087a6244c3447cf1c6a3199ae2))
* update comment ([#158](https://github.com/increase/increase-python/issues/158)) ([e75c268](https://github.com/increase/increase-python/commit/e75c268391ff2eaae0c050e8bcecea1d6d29bc24))
* update README ([#151](https://github.com/increase/increase-python/issues/151)) ([4db792a](https://github.com/increase/increase-python/commit/4db792afa4fd65590a7ae4e0fdd782069917f78c))


### Documentation

* improve error message for invalid file param type ([#164](https://github.com/increase/increase-python/issues/164)) ([e105b17](https://github.com/increase/increase-python/commit/e105b17235f182542a78ea13e5a2aaacdc937876))
* organisation -> organization (UK to US English) ([#163](https://github.com/increase/increase-python/issues/163)) ([bd21fa4](https://github.com/increase/increase-python/commit/bd21fa4e0c2648772066e3fa85a7adace525253a))


### Refactors

* **test:** refactor authentication tests ([#153](https://github.com/increase/increase-python/issues/153)) ([acdfa12](https://github.com/increase/increase-python/commit/acdfa121cec5604ef96fc8a580636e2f6d2c4927))

## 0.13.7 (2023-10-11)

Full Changelog: [v0.13.6...v0.13.7](https://github.com/increase/increase-python/compare/v0.13.6...v0.13.7)
Expand Down
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://

## Documentation

The API documentation can be found at [https://increase.com/documentation](https://increase.com/documentation).
The API documentation can be found [here](https://increase.com/documentation).

## Installation

Expand All @@ -25,7 +25,7 @@ from increase import Increase

client = Increase(
# defaults to os.environ.get("INCREASE_API_KEY")
api_key="my api key",
api_key="My API Key",
# defaults to "production".
environment="sandbox",
)
Expand All @@ -36,8 +36,10 @@ account = client.accounts.create(
print(account.id)
```

While you can provide an `api_key` keyword argument, we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
and adding `INCREASE_API_KEY="my api key"` to your `.env` file so that your API Key is not stored in source control.
While you can provide an `api_key` keyword argument,
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
to add `INCREASE_API_KEY="My API Key"` to your `.env` file
so that your API Key is not stored in source control.

## Async usage

Expand All @@ -48,7 +50,7 @@ from increase import AsyncIncrease

client = AsyncIncrease(
# defaults to os.environ.get("INCREASE_API_KEY")
api_key="my api key",
api_key="My API Key",
# defaults to "production".
environment="sandbox",
)
Expand Down Expand Up @@ -282,6 +284,16 @@ Note that requests that time out are [retried twice by default](#retries).

## Advanced

### Logging

We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.

You can enable logging by setting the environment variable `INCREASE_LOG` to `debug`.

```shell
$ export INCREASE_LOG=debug
```

### How to tell whether `None` means `null` or missing

In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:
Expand Down Expand Up @@ -321,7 +333,7 @@ By default the library closes underlying HTTP connections whenever the client is

## Versioning

This package generally attempts to follow [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

1. Changes that only affect static types, without breaking runtime behavior.
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ from increase.types import BookkeepingAccount
Methods:

- <code title="post /bookkeeping_accounts">client.bookkeeping_accounts.<a href="./src/increase/resources/bookkeeping_accounts.py">create</a>(\*\*<a href="src/increase/types/bookkeeping_account_create_params.py">params</a>) -> <a href="./src/increase/types/bookkeeping_account.py">BookkeepingAccount</a></code>
- <code title="patch /bookkeeping_accounts/{bookkeeping_account_id}">client.bookkeeping_accounts.<a href="./src/increase/resources/bookkeeping_accounts.py">update</a>(bookkeeping_account_id, \*\*<a href="src/increase/types/bookkeeping_account_update_params.py">params</a>) -> <a href="./src/increase/types/bookkeeping_account.py">BookkeepingAccount</a></code>
- <code title="get /bookkeeping_accounts">client.bookkeeping_accounts.<a href="./src/increase/resources/bookkeeping_accounts.py">list</a>(\*\*<a href="src/increase/types/bookkeeping_account_list_params.py">params</a>) -> <a href="./src/increase/types/bookkeeping_account.py">SyncPage[BookkeepingAccount]</a></code>

# BookkeepingEntrySets
Expand Down
4 changes: 2 additions & 2 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
errors=()

if [ -z "${STAINLESS_API_KEY}" ]; then
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organisation secrets on GitHub.")
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.")
fi

if [ -z "${PYPI_TOKEN}" ]; then
errors+=("The INCREASE_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organisation secrets.")
errors+=("The INCREASE_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
fi

len=${#errors[@]}
Expand Down
5 changes: 3 additions & 2 deletions bin/publish-pypi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

set -eux
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
mkdir -p dist
rye build --clean
rye publish --yes --token=$PYPI_TOKEN
2 changes: 1 addition & 1 deletion bin/test
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

bin/check-test-server && poetry run pytest "$@"
bin/check-test-server && rye run pytest "$@"
9 changes: 3 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import nox
import nox_poetry


@nox_poetry.session(reuse_venv=True, name="test-pydantic-v1")
@nox.session(reuse_venv=True, name="test-pydantic-v1")
def test_pydantic_v1(session: nox.Session) -> None:
session.run_always("poetry", "install", external=True)

# https://github.com/cjolowicz/nox-poetry/issues/1116
session._session.run("python", "-m", "pip", "install", "pydantic<2", external=True) # type: ignore
session.install("-r", "requirements-dev.lock")
session.install("pydantic<2")

session.run("pytest", "--showlocals", "--ignore=tests/functional", *session.posargs)
Loading