Created
October 25, 2021 13:16
-
-
Save BruceCodesGithub/597e61771a0a2ef32387f72554929597 to your computer and use it in GitHub Desktop.
Get Bible verses Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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