Skip to content

Instantly share code, notes, and snippets.

@BruceCodesGithub
Created October 25, 2021 13:16
Show Gist options
  • Save BruceCodesGithub/597e61771a0a2ef32387f72554929597 to your computer and use it in GitHub Desktop.
Save BruceCodesGithub/597e61771a0a2ef32387f72554929597 to your computer and use it in GitHub Desktop.
Get Bible verses Python
import requests
class Bible:
def get(self, book, chapter, verse, **kwargs):
base = f'https://bible-api.com/{book}+{chapter}:{verse}'
translation = kwargs.get('translation') or 'web'
response = requests.get(f"{base}", params={'translation': translation})
return response.json()
# print(Bible().get('romans', 12, '1'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment