{"id":25911503,"url":"https://github.com/copyleftdev/pyskills","last_synced_at":"2025-09-13T07:16:39.019Z","repository":{"id":31347142,"uuid":"34909895","full_name":"copyleftdev/pyskills","owner":"copyleftdev","description":null,"archived":false,"fork":false,"pushed_at":"2015-05-02T19:37:54.000Z","size":652,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-03T11:37:07.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/copyleftdev.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-01T15:41:57.000Z","updated_at":"2015-05-01T15:43:07.000Z","dependencies_parsed_at":"2022-09-08T09:10:30.834Z","dependency_job_id":null,"html_url":"https://github.com/copyleftdev/pyskills","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/copyleftdev/pyskills","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copyleftdev%2Fpyskills","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copyleftdev%2Fpyskills/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copyleftdev%2Fpyskills/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copyleftdev%2Fpyskills/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/copyleftdev","download_url":"https://codeload.github.com/copyleftdev/pyskills/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copyleftdev%2Fpyskills/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274411126,"owners_count":25280066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-03-03T09:17:40.576Z","updated_at":"2025-09-13T07:16:38.997Z","avatar_url":"https://github.com/copyleftdev.png","language":"Python","readme":"============\nPython Koans\n============\n\n.. image:: https://travis-ci.org/gregmalcolm/python_koans.png?branch=master\n   :target: http://travis-ci.org/gregmalcolm/python_koans\n\nPython Koans is a port of Edgecase's \"Ruby Koans\" which can be found\nat http://rubykoans.com/.\n\n.. image:: http://i442.photobucket.com/albums/qq150/gregmalcolm/PythonKoansScreenshot.png\n\nPython Koans is an interactive tutorial for learning the Python programming\nlanguage by making tests pass.\n\nMost tests are *fixed* by filling the missing parts of assert functions. Eg:\n\n    self.assertEqual(__, 1+2)\n\nwhich can be fixed by replacing the __ part with the appropriate code:\n\n    self.assertEqual(3, 1+2)\n\nOccasionally you will encounter some failing tests that are already filled out.\nIn these cases you will need to finish implementing some code to progress. For\nexample, there is an exercise for writing some code that will tell you if a\ntriangle is equilateral, isosceles or scalene.\n\nAs well as being a great way to learn some Python, it is also a good way to get\na taste of Test Driven Development (TDD).\n\n\nDownloading Python Koans\n------------------------\n\nPython Koans is available through git on Github:\n\n    http://github.com/gregmalcolm/python_koans\n\nIt is also mirrored on bitbucket for Mercurial users:\n\n    http://bitbucket.org/gregmalcolm/python_koans\n\nEither site will allow you to download the source as a zip/gz/bz2.\n\n\nInstalling Python Koans\n-----------------------\n\nAside from downloading or checking out the latest version of Python Koans, you\nneed to install the Python interpreter.\n\nAt this time of writing, there are two versions of the Python Koans:\n\n* one for use with Python 2.7 (earlier versions are no longer supported)\n* one for Python 3.1+\n\nYou should be able to work with newer Python versions, but older ones will\nlikely give you problems.\n\nYou can download Python from here:\n\n    http://www.python.org/download\n\nAfter installing Python make sure the folder containing the python executable\nis in the system path. In other words, you need to be able to be able to run\nPython from a command console. With Python 2 it will be called `python`\nor `python.exe` depending on the operating system. For Python 3 it will either\nbe `python3` or for windows it will be `python.exe`.\n\nIf you have problems, this may help:\n\n    http://www.python.org/about/gettingstarted\n\nWindows users may also want to update the line in the batch file `run.bat` to\nset the python path::\n\n    SET PYTHON_PATH=C:\\Python27\n\n\nGetting Started\n---------------\n\nJake Hebbert has created a couple of screencasts available here:\n\nhttp://www.youtube.com/watch?v=e2WXgXEjbHY\u0026list=PL5Up_u-XkWgNcunP_UrTJG_3EXgbK2BQJ\u0026index=1\n\nOr if you prefer to read:\n\nFrom a \\*nix terminal or windows command prompt go to the python\nkoans\\\\python_VERSION folder and run::\n\n    python contemplate_koans.py\n\nor::\n\n    python3 contemplate_koans.py\n\nIn my case I'm using Python 3 with windows, so I fire up my command\nshell (cmd.exe) and run this:\n\n.. image:: http://i442.photobucket.com/albums/qq150/gregmalcolm/GettingStarted.png\n\nApparently a test failed::\n\n    AssertionError: False is not True\n\nIt also tells me exactly where the problem in, its an assert on line 12\nof .\\\\koans\\\\about_asserts.py. This one is easy, just change False to True to\nmake the test pass.\n\nSooner or later you will likely encounter tests where you are not sure what the\nexpected value should be. For example::\n\n    class Dog:\n        pass\n\n    def test_objects_are_objects(self):\n        fido = self.Dog()\n        self.assertEqual(__, isinstance(fido, object))\n\nThis is where the Python Command Line can come in handy. In this case I can\nfire up the command line, recreate the scenario and run queries:\n\n.. image:: http://i442.photobucket.com/albums/qq150/gregmalcolm/DebuggingPython.png\n\n\nGetting the Most From the Koans\n-------------------------------\n\nQuoting the Ruby Koans instructions::\n\n\t\"In test-driven development the mantra has always been, red, green,\n\trefactor. Write a failing test and run it (red), make the test pass\n\t(green), then refactor it (that is look at the code and see if you\n\tcan make it any better). In this case you will need to run the koan\n\tand see it fail (red), make the test pass (green), then take a\n\tmoment and reflect upon the test to see what it is teaching you\n\tand improve the code to better communicate its intent (refactor).\"\n\n\nContent\n-------\n\nThe Python Koans is a made up of about 2/3 Ruby Koans ported material and 1/3\nPython specific tests. The content ported from Ruby Koans includes all the\nassignment projects.\n\nContent for Python 3 is a little different to the Python 2 flavor due to big\nchanges between the two different versions of the language.  For example, in\nthe Python 2 variant the differences between old and new style classes are\ncovered. This loses relevance in in the Python 3 version, but there are some\nextra tests covering new functionality.\n\n\nFinding More Koan Projects\n--------------------------\n\nThere are number of other great Koan projects out there for various languages\nand frameworks. Most of them can be found in github. Also there is a little\nkoans activity on bitbucket.\n\n* Github koan projects:\n    https://github.com/search?q=koans\u0026ref=cmdform\n\n* Bitbucket koan projects:\n    https://bitbucket.org/repo/all?name=koans\n\nAcknowledgments\n---------------\n\nThanks go to Jim Weirich and Joe O'Brien for the original Ruby Koans that the\nPython Koans is based on! Also the Ruby Koans in turn borrows from Metakoans\nso thanks also go to Ara Howard for that!\n\nAlso thanks to everyone who has contributed to Python Koans! I got a great\nheadstart by taking over a code base initiated by the combined Mikes of\nFPIP. So here's a little plug for their very cool Python podcast:\n\n  http://frompythonimportpodcast.com/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopyleftdev%2Fpyskills","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcopyleftdev%2Fpyskills","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopyleftdev%2Fpyskills/lists"}