Search for Unsplash images and upload to the Wagtail image library.
This package uses the python-unsplash API wrapper
- Github repository: https://github.com/mintyPT/wagtail-unsplash/
- Documentation https://mintyPT.github.io/wagtail-unsplash/
Install using pip:
pip install wagtail-unsplashed
After installing the package, add wagtail_unsplashed
to installed apps in your settings file:
# settings.py
INSTALLED_APPS = [
...
'wagtail_unsplashed',
...
]
and add the API credentials:
# settings.py
WAGTAIL_UNSPLASHED = {
"CLIENT_ID": "",
"CLIENT_SECRET": ""
}
You can get the needed information by creating an application at https://unsplash.com/developers
git clone [email protected]:mintyPT/wagtail-unsplash.git
Then, install the environment and the pre-commit hooks with
make install
This will also generate your uv.lock
file
Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run:
uv run pre-commit run -a
You are now ready to start development on your project! The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.
To finalize the set-up for publishing to PyPI, see here. For activating the automatic documentation with MkDocs, see here. To enable the code coverage reports, see here.
- Create an API Token on PyPI.
- Add the API Token to your projects secrets with the name
PYPI_TOKEN
by visiting this page. - Create a new release on Github.
- Create a new tag in the form
*.*.*
.
For more details, see here.
Repository initiated with fpgmaas/cookiecutter-uv.