{"id":15584241,"url":"https://github.com/ableinc/pyreact","last_synced_at":"2025-04-24T04:01:57.917Z","repository":{"id":62583068,"uuid":"292173010","full_name":"ableinc/pyreact","owner":"ableinc","description":"A pythonic adaptation of React JS","archived":false,"fork":false,"pushed_at":"2020-10-02T19:28:19.000Z","size":23,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T20:06:03.775Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ableinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-02T03:52:54.000Z","updated_at":"2024-10-05T02:53:21.000Z","dependencies_parsed_at":"2022-11-03T22:01:46.201Z","dependency_job_id":null,"html_url":"https://github.com/ableinc/pyreact","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/ableinc%2Fpyreact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ableinc%2Fpyreact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ableinc%2Fpyreact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ableinc%2Fpyreact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ableinc","download_url":"https://codeload.github.com/ableinc/pyreact/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250560034,"owners_count":21450170,"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-10-02T20:40:28.134Z","updated_at":"2025-04-24T04:01:56.798Z","avatar_url":"https://github.com/ableinc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyReact\nThe goal of the repo is to introduce a pythonic web application tool similar to ReactJS. As you look through the code or build with PyReact you will notice similarities between the two; this is the point. You should be able to move between the two (PyReact \u0026 ReactJS) with ease and without the need to learn an entire new flow. \n\nRelease State: Beta (cautious using in production)\n\n# Requirements\n1. Python 3.6+\n2. PyPM (pip install pypm2) - Refer to my repo PyPM for more information\n\n# Recommendations\n1. Please look at the [PyPM](https://github.com/ableinc/pypm) repo. This tool is required to run PyReact and is similar to npm.\n2. If you're unfamiliar with ReactJS, head over to their site and get an overview of what it is.\n3. While PyReact is still in development, it is recommended to use this within a python virtual environment.\n\n# Installation \n - PyPI\n  ```bash\n  pip install pyreact2\n  ```\n\n - Locally\n  ```bash\n  pip install pypm2\n  git clone https://github.com/ableinc/pyreact\n  cd pyreact\n  pypm install\n  pypm setup\n  ```\n\n# How to run\n```bash\npypm start\n```\n\n# Create your own PyReact app\n***Note: It is recommended that you install PyReact in a python virtual environment.***\n1. Make sure you follow the steps above to install PyReact\n2. Once installed, run ```pyreact init [app_name]```\n3. ```cd``` into your new PyReact app directory\n4. Run ```pypm install```\n5. All done!\n\n# File Structure\nNotice, ```/app``` is unrelated to the PyReact code. It is necessary to develop a PyReact web application, but is not tracked for release under the PyReact repo. Its here for testing purposes.\n\nYou will notice the start command in the package.json points to the index.py file in ```/app```. This is normal react convention. If you'd like to build your own PyReact application, please follow the installation instructions above and alter the contents of ```/app```. Do NOT edit within the ```/public``` folder, as you could break your project.\n\n# Environment Variables\nIf you'd like your PyReact project to recognize new environment variables please prepend PYREACT_ to your variable names. Note, you will not need to import or install a library to import enviornment variables, PyReact does it under the hood. Just import variables with os.environ.\n\n# Examples\nJust like this repo, examples and documentation are on-going. For the meantime, refer to the ```/app``` folder to see how everything works. Feel free to explore the pyreact code itself, if you notice something, make a PR!\n\n# Important Information\n* When you are creating your class views, containing your render function, make sure that ```self.root(self)``` is the first line in render. This flow is very important. In future updates this will not be needed.\n\n* PyReact is both a client-side and server-side application. You have the full flexibility to do one or the other or both. Go to the ```/examples``` directory for examples.\n\n# Changelog\n1. Append user defined react class to index file to render -  Done\n2. Add stylesheet rendering with html - Done\n3. Add or create a python syntax friendly way of generating views with HTML attributes (i.e. not using multiline strings to create view)\n4. Find and replace %PUBLIC_URL% in index.html - Done\n5. When user adds list of HTML elements to html content in render, it will be parsed appropriately - Done\n6. Fix recurssion  error  generated when setState() is used in either render() or __init__() - Done\n7. Be able to render multiple stylesheets for multiple pages - Done\n8. Add event listeners - Done\n9. Stop the browser from reopening the PyReact project homepage after every server refresh. - Disabled (Bug)\n10. Add Node dot notation dictionary/Object attribute\n11. When printing in view, display in browser console\n12. Create CLI tool to create PyReact app - Done","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fableinc%2Fpyreact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fableinc%2Fpyreact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fableinc%2Fpyreact/lists"}