{"id":33230169,"url":"https://github.com/asif-mahmud/pyramid_runner","last_synced_at":"2026-01-12T06:32:38.138Z","repository":{"id":77478166,"uuid":"79733695","full_name":"asif-mahmud/pyramid_runner","owner":"asif-mahmud","description":"Pyramid Scaffold to create web api.","archived":false,"fork":false,"pushed_at":"2022-11-01T19:07:43.000Z","size":57,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-21T11:03:11.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asif-mahmud.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}},"created_at":"2017-01-22T17:40:46.000Z","updated_at":"2021-04-27T19:14:00.000Z","dependencies_parsed_at":"2024-01-03T01:20:41.497Z","dependency_job_id":"146cb63d-06d5-4600-b62c-1cc2e364282c","html_url":"https://github.com/asif-mahmud/pyramid_runner","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/asif-mahmud/pyramid_runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asif-mahmud%2Fpyramid_runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asif-mahmud%2Fpyramid_runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asif-mahmud%2Fpyramid_runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asif-mahmud%2Fpyramid_runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asif-mahmud","download_url":"https://codeload.github.com/asif-mahmud/pyramid_runner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asif-mahmud%2Fpyramid_runner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2025-11-16T17:00:42.350Z","updated_at":"2026-01-12T06:32:38.117Z","avatar_url":"https://github.com/asif-mahmud.png","language":"Python","funding_links":[],"categories":["Cookiecutters"],"sub_categories":[],"readme":"# pyramid_runner\n\n![Image not found](images/pyramid_runner.png)\n\nA minimal Pyramid scaffold that aims to provide a starter template\nto build small to large web services. To achieve this goal the following\ndesign decisions are made for you -\n\n1. Completely decoupled from client-side coding\n2. Use only JSON renderer\n3. Use only url traversal\n4. Focus on resource management\n\nFollowing packages are included in the `setup.py` -\n\n1. [Pyramid](http://www.pylonsproject.org/) itself\n2. [SQLAlchemy](http://www.sqlalchemy.org/)\n3. [Alembic](http://alembic.zzzcomputing.com/)\n\n## Key Features\n\n* A predetermined project structure (See Project Structure).\n* Saves hours of google search and typing.\n* Open source and free.\n* IDE (i.o PyCharm) friendly.\n* One configuration file per environment(i.e development and production).\n* A simple **Makefile** to make life even easier(See the usage of the Makefile).\n* A built-in `ModelBase` for **SQLAlchemy** (See features of the `ModelBase`).\n* Uses `CookieCutter` project templating system.\n\n## Requirements\n\n* A Linux OS\n* [Python 3+](https://www.python.org/downloads/)\n* [CookieCutter](https://github.com/audreyr/cookiecutter)\n\n## Installation\n\nAfter installing `cookiecutter`, run -\n\n```\ncookiecutter https://github.com/asif-mahmud/pyramid_runner.git\n```\n\n***(Obsolete)***\n- Create a `Python virtual environtment` first.\n- Clone the **git repo**.\n- Open a `Terminal` inside `pyramid_runner`. \n- Activate the `virtual environtment` by running `source \u003cyour-venv-path\u003e/bin/activate`. \n- Run `python setup.py install`\n\n## Project Structure\n\n- **#** - Stands for Folder.\n- **+** - Stands for File.\n- All `__init__.py` are ignored.\n- All `README.md`'s are ignored.\n- Learn more about the purpose of the folders in their `README.md` file.\n\n```\n # project_name\n |\n |-# database\n |\n |-# project_name - Pyramid application code\n | |\n | |-# models\n | |-# views\n | |-# tests\n | |-# security\n | |-# resources - Includes all your resource classes including Root resource.\n |\n |-# alembic\n | |\n | |-# versions\n | |-+ script.py.mako\n | |-+ env.py\n |\n |-# wsgi - Will contain wsgi servers's log files and pid file.\n |\n |-+ setup.py - Python distribution setup file.\n |-+ development.ini - Development environment config file.\n |-+ production.ini - Production environment config file.\n |-+ alembic.ini - Pyramid project friendly alembic config file.\n |-+ MANIFEST.in\n |-+ CHANGES.txt\n |-+ Makefile - Provides some useful shortcut commands.\n```\n\n## Usage of Makefile \n\nThe `Makefile` inside the `project folder` provides some easy shortcut commands-\n\n- `make setup` : This command must be run once at the beginnng.\n- `make revision`: Make a database revision by [Alembic](http://alembic.zzzcomputing.com/).\n- `make upgrade` : Migrate your database to latest revision.\n- `make downgrade` : Migrate your database to a previous revision.\n- `make run` : Run `pserve` to serve local server. Additionally it will start watching `SASS` sources and angular apps.\n- `make test` : Run `pytest` to test the project.\n\n## Features of `ModelBase`\n\nIt is a default `Model` base for all of your **SQLAlchemy** Models. But you don't have to inherit it, instead you \ninherit the infamous `Base` class. It provides the following class level attributes -\n\n- `id` : An `Integer Column` as `primary_key`. Feel free to override it anytime.\n- `created_on` : A `DateTime Column` to provide when the entry was created. Defaults to current time.\n- `updated_on` : A `DateTime Column` to provide when the entry was updated. Always the last update time.\n- `__tablename__` : You don't have to write `__tablename__` whenever you create a `Model`\n- `__json__` : Method to represent the model as `JSON` object.\n\n## Helper Classes\n\n### `resources.base.BaseRoot`\nRoot resource inherits this class. See the default `resources.root.Root` resource.\n\n### `resources.base.BaseChild`\nA helper base class for child nodes in the resource tree. `__name__` and `__parent__`\nattributes are handled in the `__init__` method. So a container child need to\nimplement `child_instance` and/or `child_class` (***Updated in version 4.0.0***) \nmethods of it's own to generate it's requested child node. Decisions made here are -\n\n1. `Parent/Container` node is responsible to generate `Child` node.\n2. `Parent/Container` node is responsible to give the `Child` instance a name.\n\n### `views.base.BaseView`\nA helper class for view classes. What it does -\n\n1. Sets the `request` attribute in `__init__` method.\n2. Adds a default empty view for `OPTIONS` HTTP requests.\n\n### `views.base.BaseJSONResponse`\n(**new in version 4.0.0**)\nA subclass of `dict` to provide consistent response from different views.\nIt includes the following keys-\n\n1. code : An integer code mostly representing HTTP response code. Dafaults 200.\n2. status: A string status like \"OK\" or \"ERROR\". Defaults \"OK\".\n3. msg: A string containing a message for the client. Defaults \"\".\n4. error: A string containing any error message to send to the client. Defaults \"\".\n\nThese keys can be accessed both as dictionary keys or class attributes.\n\n### `views.base.BaseStatusReport`\n(**new in version 6.0.0**)\nA subclass of `BaseJSONResponse`. This is helpful to quickly define\na status(error or success) report standard for the API.\n\n### `security.base.BaseUserRetriever`\nA base class to retreive authenticated user info from request params.\n\n**NOTE:** Removed from version 3.9+ \n\n### `security.base.BaseAuthPolicy`\nBase class for ticket based authentication policy.\n\n**NOTE:** Removed from version 3.9+\n\n## Version History\n\n### Version 6.0.1\n* Added `log_error` method to `BaseResource`.\n\n### Version 6.0.0\n* Added `BaseStatusReport` and some subclasses of it. See `views.errors` package.\n* Updated project **README.md** to better reflect the setup procedure.\n* Fixed some stylings.\n\n### Version 5.9.0\n* `BaseTest` and `BaseFunctionalTest` is being merged into single `BaseTest`\n\n### Version 5.0.0\n* Little fixes.\n* Added a `.gitignore` file.\n\n### Version 4.9.0\n* Test base class now uses `development.ini` file to read the configurations. So tests will run\nwith same configurations as the development versions.\n* Initializing database by inserting some test data is made easier by introducing `init_db` and\n`clean_db` methods in `BaseTest` class. Child classes will just implement these methods to insert\ntest data into database by normal `session.add` or `session.delete` methods.\n\n### Version 4.0.0\n* More pythonic all the way. Improved `import` statements.\n* `BaseView`, `BaseChild` has more functionalities.\n\n### Version 3.9.0\n* Added `pyramid_jwt` for `JWT` authentication suitable for `CORS`.\n\n### Version 3.0.0\n* Using `Gunicorn` instead of waitress as development and production server.\n\n### Version 2.9.0\n* Added `CORS` headers on `NewResponse` event.\n\n### Version 2.0.0\n* Using `cookiecutter` project templating system.\n\n### Version 1.9.0\n* Added a basic stateless security system.\n\n### Version 1.0.0\n* `ModelBase` includes an abstract `__json__(request)` method.\n\n### Version 0.9.0\n* Working version with 3 utility classes -\n    1. `BaseRoot`\n    2. `BaseChild`\n    3. `BaseView`\n* Added an example functional test for `home_view`.\n\n### Version 0.0.1\n* Git initialization.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasif-mahmud%2Fpyramid_runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasif-mahmud%2Fpyramid_runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasif-mahmud%2Fpyramid_runner/lists"}