{"id":13896917,"url":"https://github.com/cstrap/python-snippets","last_synced_at":"2026-01-22T15:13:18.172Z","repository":{"id":42121840,"uuid":"91467277","full_name":"cstrap/python-snippets","owner":"cstrap","description":"Python snippets for Visual Studio Code","archived":false,"fork":false,"pushed_at":"2024-01-03T00:13:57.000Z","size":96,"stargazers_count":109,"open_issues_count":10,"forks_count":33,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-25T02:33:22.184Z","etag":null,"topics":["python","vscode","vscode-snippets"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cstrap.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-16T14:22:43.000Z","updated_at":"2024-10-31T01:48:55.000Z","dependencies_parsed_at":"2024-11-25T04:35:15.072Z","dependency_job_id":null,"html_url":"https://github.com/cstrap/python-snippets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cstrap/python-snippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstrap%2Fpython-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstrap%2Fpython-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstrap%2Fpython-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstrap%2Fpython-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cstrap","download_url":"https://codeload.github.com/cstrap/python-snippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cstrap%2Fpython-snippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28664985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T14:01:31.714Z","status":"ssl_error","status_checked_at":"2026-01-22T13:59:23.143Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","vscode","vscode-snippets"],"created_at":"2024-08-06T18:03:14.080Z","updated_at":"2026-01-22T15:13:18.150Z","avatar_url":"https://github.com/cstrap.png","language":null,"funding_links":[],"categories":["Others","vscode"],"sub_categories":[],"readme":"# Python snippets\n\nPython snippets collections.\n\nInitially ported from PyCharm, TextMate, SublimeText and other editors/IDEs.\n\nIf you'd like to contribute, feel free to [submit a pull request on github](https://github.com/cstrap/python-snippets)\n\nThanks!\n\n## Features\n\n### Base snippets\n\n| Abbreviation | Description                       |\n|--------------|-----------------------------------|\n| env          | #!/usr/bin/env python             |\n| env3         | #!/usr/bin/env python3            |\n| enc          | # -*- coding=utf-8 -*-            |\n| enco         | # coding=utf-8                    |\n| fenc         | from future import ...            |\n| fenco        | from future import ... (no `-*-`) |\n| im           | import                            |\n| fim          | from ... import ...               |\n| class        | New class                         |\n| classd       | New dataclass                     |\n| defs         | New method                        |\n| def          | New function                      |\n| dowhile      | Do while structure                |\n| adef         | Async function                    |\n| property     | New property                      |\n| enum         | New Enum                          |\n| if           | if                                |\n| for          | for                               |\n| lambda       | lambda expression                 |\n| while        | while                             |\n| try          | try:except:                       |\n| tryef        | try:except:else:finally:          |\n| trye         | try:except:else:                  |\n| tryf         | try:except:finally:               |\n| s            | self                              |\n| __           | __magic__                         |\n| ifmain       | if __name__ == \"__main__\"         |\n\n### Comprehensions\n\n| Abbreviation | Description                        |\n|--------------|------------------------------------|\n| lc           | List comprehension                 |\n| lcie         | List comprehension if else         |\n| lci          | List comprehension if filter       |\n| dc           | Dictionary comprehension           |\n| dci          | Dictionary comprehension if filter |\n| sc           | Set comprehension                  |\n| sci          | Set Comprehension if filter        |\n| gc           | Generator comprehension            |\n| gci          | Generator comprehension if filter  |\n\n### Unittest\n\n| Abbreviation | Description        |\n|--------------|--------------------|\n| ase          | Assert equal       |\n| asne         | Assert not equal   |\n| asr          | Assert raises      |\n| ast          | Assert True        |\n| asf          | Assert False       |\n| asi          | Assert is          |\n| asint        | Assert is not      |\n| asino        | Assert is None     |\n| asinno       | Assert is not None |\n| asin         | Assert in          |\n| asni         | Assert not in      |\n| as           | Assert             |\n| fail         | Fail (a test)      |\n\n### Debugging\n\n| Abbreviation | Description    |\n|--------------|----------------|\n| pdb          | PDB set trace  |\n| ipdb         | iPDB set trace |\n| rpdb         | rPDB set trace |\n| pudb         | PuDB set trace |\n\n### Tkinter\n\n| Abbreviation  | Description        |\n|---------------|--------------------|\n| imtk          | Import Tkinter py2 |\n| imtk3         | Import tkinter py3 |\n| config        | Root configuration |\n| button        | Button             |\n| label         | Label              |\n| frame         | Frame              |\n| entry         | Entry              |\n| grid          | Grid               |\n| sticky        | Sticky             |\n| checkbutton   | Check button       |\n| mainloop      | Main loop          |\n| pack          | Pack               |\n| side          | Side               |\n| bind          | Bind               |\n| menu          | Menu               |\n| addcascade    | Add cascade        |\n| addcommand    | Add command        |\n| addseperator  | Add seperator      |\n\n## Release Notes\n\nSee [changelog](CHANGELOG.md) for all changes and releases.\n\n## Troubleshooting\n\nIf you experience problems with the auto-formatting of certain snippets, make sure you have the option `editor.tabCompletion` set on `onlySnippets` or `on`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcstrap%2Fpython-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcstrap%2Fpython-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcstrap%2Fpython-snippets/lists"}