-
Update your package files with the necessary changes (code, documentation, tests, etc.).
-
Update the version number of your package in the
pyproject.toml
file. Semantic versioning (MAJOR.MINOR.PATCH) is a common strategy for version numbers. For example:[tool.poetry] name = "your-package-name" version = "1.0.1" # update this with the new version description = "Your package description" # ... other metadata
-
Commit your changes to your version control system (e.g., Git). It's a good practice to tag your release with the version number:
git commit -am "Update package to version 1.0.1" git tag -a 1.0.1 -m "Release version 1.0.1" git push origin master --tags
If not already done, add you pypi creds to poetry. The token may be saved in your environment variables
poetry config pypi-token.pypi YOUR_API_TOKEN
poetry build
poetry publish
If poetry is installed in a python you no longer have (no poetry commands recognized)): curl -sSL https://install.python-poetry.org | python - --uninstall Install via powershell: (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
A few helper functions to make gspread even easer to use.
Make sure you have a cred.json file to a google service account.
Set environment variables for
GSPREADER_GOOGLE_CLIENT_EMAIL=client_email_from_your_creds.json
GSPREADER_GOOGLE_CREDS=the dict of your creds (in the case that you've deployed to Heroku and you've set the creds dict as an env var)
OR
GSPREADER_GOOGLE_CREDS_PATH=path_to_your_creds.json
Share your google spreadsheet with the client_email address in your google credentials file.
Then get a worksheet by name
`sheet = get_sheet('suzy', 'titles')`
or by index
`sheet = get_sheet('suzy', 0)`
then get the data
`data = sheet.get_all_records()`
and then update the data
`update_range(sheet, data)`