{"id":20354799,"url":"https://github.com/pgorecki/python-ddd-old","last_synced_at":"2025-03-04T16:46:40.516Z","repository":{"id":72885993,"uuid":"157855919","full_name":"pgorecki/python-ddd-old","owner":"pgorecki","description":"Python DDD example","archived":false,"fork":false,"pushed_at":"2018-12-07T08:32:20.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-15T00:41:01.921Z","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/pgorecki.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,"publiccode":null,"codemeta":null}},"created_at":"2018-11-16T11:05:44.000Z","updated_at":"2022-03-16T10:49:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"36ed2669-75b1-49a3-be80-5dda84b59e1f","html_url":"https://github.com/pgorecki/python-ddd-old","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgorecki%2Fpython-ddd-old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgorecki%2Fpython-ddd-old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgorecki%2Fpython-ddd-old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgorecki%2Fpython-ddd-old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgorecki","download_url":"https://codeload.github.com/pgorecki/python-ddd-old/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241886255,"owners_count":20036959,"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":[],"created_at":"2024-11-14T23:09:44.766Z","updated_at":"2025-03-04T16:46:40.495Z","avatar_url":"https://github.com/pgorecki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"AUCTION APPLICATION\n\nThe goal is to implement an automatic bidding system, described here: https://www.ebay.co.uk/pages/help/buy/bidding-overview.html\n\nUser stories:\n\n* As a seller I can list a new item for sale. The item has the following fields: text, description, starting price\n\n* As a seller, I'm allowed to list up to 3 items at the same time\n\n* As a user I can view all the items for sale. For each item I will see: text, description, current price, minimum bidding price, a winner, all participants, action end date\n\n* As a bidder, when placing a bid, I enter the maximum amount I am willing to pay for the item. The seller and other bidders don't know my maximum bid\n\n* As a bidder, when placing a bid, my bid must be higher than the actual price\n\n* Auction Store will automatically calculate the current price of an item based on the bids that were made\n\n* When auction ends, auction store will notify the seller by email. The email will contain the name of the winner and the sell price.\n\n* When auction ends, all losing participants will recieve an email with the information that they lost an auction. \n\n* When auction ends, the winning participant will reciewve an email with information the user has won and the price for an item.\n\n\n\n\n```\npipenv install\npipenv shell\n```\n\nTo run tests\n```\npytest\n```\n\nTo run tests in watch mode\n```\nptw\n```\n\nTo run the app as Falcon server\n```\nFRAMEWORK=falcon gunicorn --reload main\n```\n\nTo run the app as Flask server\n```\nFRAMEWORK=flask gunicorn --reload main\n```\n\n\nProject structure:\n\n```\ncontext-1\n  domain\n    entities\n    value_objects\n    aggregates\n    services\n    repositories\n    factories?\n    interfaces\n    events\n  application\n    services\n  infrastructure\n    ??\n  tests??\n\ncontext-2\n\ncontext-3\n\ndi_setup\nmain - main entrypoint to the app\n```\n\nDomain artifacts\n\n* entities - mutable, identifiable, unaware of persistance\n\n* value objects - immutable, self-contained\n\n* aggregates - any transaction should modify only one aggegate at a time, 70-80% usually contain olny one entity, consistency boundary, hosts methods which will modify the aggregate\n\n* events - significant state transition, something which domain experts care about\n\n* factories - for entity construction, ubiquotous language verbs, hide construction details (Python function)\n\n* repositories - store aggregates, abstraction over persistence mehanism\n\n* context maps - mappings between concepts between bounded contexts\n\nTODO:\n * event bus? for domain\n \nReferences:\n\n* https://skillsmatter.com/skillscasts/5025-domain-driven-design-with-python(python-ddd)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgorecki%2Fpython-ddd-old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgorecki%2Fpython-ddd-old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgorecki%2Fpython-ddd-old/lists"}