{"id":13814271,"url":"https://github.com/rbanffy/testable_appengine","last_synced_at":"2025-10-02T23:35:15.774Z","repository":{"id":13390033,"uuid":"16078225","full_name":"rbanffy/testable_appengine","owner":"rbanffy","description":"A testable Python skeleton application for Google's App Engine and AppScale environments","archived":false,"fork":false,"pushed_at":"2023-05-01T20:15:16.000Z","size":86,"stargazers_count":32,"open_issues_count":2,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-13T09:43:57.163Z","etag":null,"topics":["dev-appserver","engine","google-appengine","ipdb","makefile","pudb","python","sdk","virtualenv"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbanffy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2014-01-20T17:48:24.000Z","updated_at":"2024-12-19T11:37:02.000Z","dependencies_parsed_at":"2024-04-11T20:01:51.845Z","dependency_job_id":"445b0bc2-76f9-493b-8156-6c70e3b70854","html_url":"https://github.com/rbanffy/testable_appengine","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbanffy%2Ftestable_appengine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbanffy%2Ftestable_appengine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbanffy%2Ftestable_appengine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbanffy%2Ftestable_appengine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbanffy","download_url":"https://codeload.github.com/rbanffy/testable_appengine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235049110,"owners_count":18927734,"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","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":["dev-appserver","engine","google-appengine","ipdb","makefile","pudb","python","sdk","virtualenv"],"created_at":"2024-08-04T04:01:50.170Z","updated_at":"2025-10-02T23:35:10.473Z","avatar_url":"https://github.com/rbanffy.png","language":"Python","readme":"testable_appengine\n==================\n\nA testable Python skeleton application for Google App Engine and\nAppScale environments.\n\n![Demo]\n(https://raw.githubusercontent.com/wiki/rbanffy/testable_appengine/screencap.gif)\n\nWhy?\n----\n\nWriting properly testable Python applications to run on Google App\nEngine is not trivial. Keeping the different application environments\nsegregated is also an issue if all environments share the same SDK and\nPython environment. This template helps you build your application in\nsuch way it's contained in a folder, along with its virtualenvironment\nand separate copy of the SDK. It also preinstall ipdb and pudb\ndebuggers, nose, pytest and webtest testing tools,\nappengine-fixture-loader (to load test or bootstrap data), and flake8 to\ndo style checks on your code.\n\nThis tree was extracted from a larger project that makes use of it and\nfurther evolved on its own, with the enhancements ported back.\n\n![nosetests running]\n(https://raw.githubusercontent.com/wiki/rbanffy/testable_appengine/screenshot.png)\n\nOverall Structure\n-----------------\n\nWhen you clone the Git repo, you'll have a tree structure not unlike\nthe one below. This is the starting point for yout app.\n\n    ├── build  (will be created when you run `make venv`)\n    ├── cache  (will be created when you run `make venv`)\n    ├── LICENSE\n    ├── Makefile  (includes resourecs/Makefile)\n    ├── README.md  (this file)\n    ├── requirements.txt\n    ├── resources\n    │   ├── autogenerated\n    │   ├── get_current_sdk_version.sh\n    │   ├── Makefile\n    │   └── requirements.txt (includes ../requirements.txt)\n    ├── src  (contains a sample application)\n    │   ├── app.yaml\n    │   └── main.py\n    └── tests\n        ├── __init__.py\n        ├── persons.json\n        └── sanity_test.py\n\nSetting up your development environment\n---------------------------------------\n\nThere is a makefile in the root directory. Running `make venv` will\nbuild a virtualenv in the `.env` folder, download the App Engine SDK,\nbuild the appropriate .pth files for your machine and install all\nrequirements from the `resources/requirements.txt` file. If you wish to\nuse a Python environment you provide yourself, you can make the\nvirtualenv youself and run `make libraries` with VENV pointing to your\nvirtualenv (as in `VENV=.my_env make libraries`)\n\nThe actual makefile is under resources. Your own makefile (with your own\ntargets) should include it and extend it like the included Makefile\ndoes.\n\nPlease check the makefile before using it, as it may not make sense for\nyour environment. It was tested on Ubuntu, Fedora, OSX (10.7+, provided\nyou have functional pip and virtualenv utilities) and Windows 8.1 under\n[Cygwin](http://www.cygwin.com/) and Windows 10 under Ubuntu on\nWindows. If you are developing under Windows and don't use Cygwin or the\nWindows Subsystem for Linux, you are suffering more than you need for no\ngood reason.\n\n![Under Windows+Cygwin]\n(https://raw.githubusercontent.com/wiki/rbanffy/testable_appengine/windows.png)\n\n![Under Ubuntu on Windows]\n(https://raw.githubusercontent.com/wiki/rbanffy/testable_appengine/ubuntu_on_windows.png)\n\nWhen done, you can activate your virtualenv with the usual `source\n.env/bin/activate` or your favorite virtualenv tool. The tests will not\nfunction outside the local virtualenv. From the virtualenv, invoking\ndev_appserver.py and appcfg.py will use the versions in the SDK\ndownloaded during install (check the `Makefile` for current version).\n\nYour app should go in the local folder. Run your application using the\ndev_appserver.py script from within the virtualenv, as in\n`dev_appserver.py .`. Deploying ignores the files that do not belong to\nyour application (the license, this README, cache, tests, resources and\nso on).\n\nTests\n-----\n\nThere are tests in the tests folder. The sanity_test.py checks whether\neverything is sane after you set up the environment.\n\nDebugging\n---------\n\nDebugging works like you'd expect. You just use pdb, ipdb or pudb (ipdb\nand pudb seem to have a tendency not to work under the dev_appserver,\nbut pdb is just fine). Rule is, use ipbd or pudb if you want to debug\nsomething that's called by a test (run something like `pudb\n.env/bin/nosetests`), pdb for a live web application. Worst case\nscenario is that you just need to edit a little more. You can also\neasily use iPython to explore your ideas before you commit them to code.\n\n![ipython prompt and ipdb in a test]\n(https://raw.githubusercontent.com/wiki/rbanffy/testable_appengine/using_ipdb.png)\n\n![Using pudb]\n(https://raw.githubusercontent.com/wiki/rbanffy/testable_appengine/pudb.png)\n\nContributing\n------------\n\nFile a bug report (enhancement suggestions are fine too), fork it, PEP-8\nit, test it, and, if it works, send a pull request. When in doubt, get\nin touch. We'll figure out what needs to be done.\n\n![This app is proudly checked with Travis](https://api.travis-ci.org/rbanffy/testable_appengine.svg)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbanffy%2Ftestable_appengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbanffy%2Ftestable_appengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbanffy%2Ftestable_appengine/lists"}