Skip to content

Instantly share code, notes, and snippets.

@mw3i
Last active March 21, 2025 16:50
Show Gist options
  • Save mw3i/bbd2302fda93612368909b6e35def4a0 to your computer and use it in GitHub Desktop.
Save mw3i/bbd2302fda93612368909b6e35def4a0 to your computer and use it in GitHub Desktop.
import a github gist in python
'''
Import a github gist as a python package
'''
import urllib.request
url = 'https://gist.githubusercontent.com/mw3i/998d21136363a10f600e925f236ca852/raw/9b3528fb54b62ac55ee265c5b3cc6eca42344da0/sqlachemy_convenience_wrapper.py'
with open('package.py', 'w') as file: file.write(urllib.request.urlopen(url).read().decode())
import package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment