{"id":37083513,"url":"https://github.com/senavs/pyjserver","last_synced_at":"2026-01-14T10:11:23.260Z","repository":{"id":62581194,"uuid":"284277183","full_name":"senavs/pyjserver","owner":"senavs","description":"Python implementation of Node JSON Server (Flask as backend).","archived":false,"fork":false,"pushed_at":"2020-08-01T22:29:07.000Z","size":136,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-29T06:06:27.233Z","etag":null,"topics":["filedata","json","json-server","nodejs","pyjserver","python","python-json-server","python3","server"],"latest_commit_sha":null,"homepage":"http://linkedin.com/in/senavs","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/senavs.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}},"created_at":"2020-08-01T14:36:34.000Z","updated_at":"2025-02-05T23:57:10.000Z","dependencies_parsed_at":"2022-11-03T21:20:25.208Z","dependency_job_id":null,"html_url":"https://github.com/senavs/pyjserver","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/senavs/pyjserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senavs%2Fpyjserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senavs%2Fpyjserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senavs%2Fpyjserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senavs%2Fpyjserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/senavs","download_url":"https://codeload.github.com/senavs/pyjserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senavs%2Fpyjserver/sbom","scorecard":{"id":810944,"data":{"date":"2025-08-11","repo":{"name":"github.com/senavs/pyjserver","commit":"5f362d778ac14d5d43a1d8a9743d43c3614605eb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T13:09:55.310Z","repository_id":62581194,"created_at":"2025-08-23T13:09:55.310Z","updated_at":"2025-08-23T13:09:55.310Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["filedata","json","json-server","nodejs","pyjserver","python","python-json-server","python3","server"],"created_at":"2026-01-14T10:11:22.792Z","updated_at":"2026-01-14T10:11:23.254Z","avatar_url":"https://github.com/senavs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python JSON Server\r\nPython implementation of Node JSON Server (Flask as backend).\r\n\r\n![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/senavs/pyjserver)\r\n![PyPI](https://img.shields.io/pypi/v/pyjserver)\r\n![PyPI - License](https://img.shields.io/pypi/l/pyjserver)\r\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/pyjserver)\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"/docs/gif/pyjserver-demonstration.gif\" width=\"50%\" alt=\"demonstraction\" /\u003e\r\n\u003c/p\u003e\r\n\r\n## About\r\nMake a full REST API without coding!  \r\npyjserver is a python implementation of [Node JSON Sever](https://github.com/typicode/json-server), \r\nwhich creates a full REST api (with GET, POST, PUT and DELETE methods) based on json file.\r\n\r\n## What's Next\r\n- PATCH HTTP method.\r\n- Filter data with GET HTTP method.\r\n- Pagination data with GET HTTP method.\r\n\r\n## Install\r\nPython JSON Server library is on PyPi repository, so it can be installed with `pip`.\r\n```sh\r\n\u003e\u003e\u003e pip install pyjserver\r\n```\r\n\r\n## Get stated\r\nAfter install pyjserver, create `db.json` file with the endpoints and data.\r\n```json\r\n{\r\n  \"python-libs\": [\r\n    {\r\n      \"id\": 1,\r\n      \"name\": \"pyjserver\",\r\n      \"version\": \"1.0.0\"\r\n    },\r\n    {\r\n      \"id\": 2,\r\n      \"name\": \"flask\",\r\n      \"version\": \"1.1.0\"\r\n    },\r\n    {\r\n      \"id\": 3,\r\n      \"name\": \"flask-restful\",\r\n      \"version\": \"0.3.8\"\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nRun the pyjserver cli command.\r\n```sh\r\n\u003e\u003e\u003e python -m pyjserver my-server ./db.json\r\n```\r\nOR\r\n```sh\r\n\u003e\u003e\u003e python3 -m pyjserver my-server ./db.json\r\n```\r\nAnd the follow output will be displayed:\r\n```\r\n * Serving Flask app \"my-server\" (lazy loading)\r\n * Environment: production\r\n   WARNING: This is a development server. Do not use it in a production deployment.\r\n   Use a production WSGI server instead.\r\n * Debug mode: off\r\n * Running on http://localhost:5000/ (Press CTRL+C to quit)\r\n```\r\n\r\nNow to test the API, if you go to http://localhost:5000/python-libs you will get the same json in db.json.\r\n```json\r\n[{\"id\":1,\"name\":\"pyjserver\",\"version\":\"1.0.0\"},{\"id\":2,\"name\":\"flask\",\"version\":\"1.1.0\"},{\"id\":3,\"name\":\"flask-restful\",\"version\":\"0.3.8\"}]\r\n```\r\n\r\nWith the same URL, you can send POST requests to add, PUT requests to edit and DELETE requests to remove from json file.\r\n\r\n`TIP` for each json key, it will be created an endpoint with GET, POST, PUT and DELETE HTTP methods. \r\nYou can also see all available endpoints in root url (http://localhost:5000/).\r\n```json\r\n{\r\n   \"endpoints\" : [\r\n      {\r\n         \"name\" : \"python-libs\",\r\n         \"route\" : \"/python-libs\"\r\n      }\r\n   ],\r\n   \"methods\" : [\r\n      \"GET\",\r\n      \"POST\",\r\n      \"PUT\",\r\n      \"DELETE\"\r\n   ]\r\n}\r\n\r\n```\r\n\r\n## JSON file schema\r\n**Format:** JSON object with a list of JSON objects. \r\n\r\n**Main JSON key:** name of the endpoint  \r\n**JSON list value:** list with all records for the endpoint. To start with no data, just place an empty list `[]`  \r\n**JSONs inside the list:** each record for the endpoint. **DO NOT FORGET TO ADD SEQUENTIAL `ID` KEY FOR EACH RECORD**\r\n```json\r\n{\r\n  \"endpoint-1\": [\r\n    {\r\n      \"id\": 1,\r\n      \"name\": \"data 01\"\r\n    },\r\n    {\r\n      \"id\": 2,\r\n      \"name\": \"data 02\"\r\n    }\r\n  ],\r\n  \"endpoint-2\": [\r\n    {\r\n      \"id\": 1,\r\n      \"name\": \"another data 01\"\r\n    }\r\n  ],\r\n  \"endpoint-3\": []\r\n}\r\n```\r\n\r\nSo the JSON above will create 3 endpoints `/endpoint-1` (with 2 record data), `endpoint-2` (with 1 record data) and `endpoint-3` (with no record data). \r\nThe home page for this json file will display:\r\n```json\r\n{\r\n   \"endpoints\" : [\r\n      {\r\n         \"name\" : \"endpoint-1\",\r\n         \"route\" : \"/endpoint-1\"\r\n      },\r\n      {\r\n         \"name\" : \"endpoint-2\",\r\n         \"route\" : \"/endpoint-2\"\r\n      },\r\n      {\r\n         \"name\" : \"endpoint-3\",\r\n         \"route\" : \"/endpoint-3\"\r\n      }\r\n   ],\r\n   \"methods\" : [\r\n      \"GET\",\r\n      \"POST\",\r\n      \"PUT\",\r\n      \"DELETE\"\r\n   ]\r\n}\r\n```\r\n\r\n## HTTP methods\r\nFor each endpoint created, is allowed `GET`, `POST`, `PUT` and `DELETE` HTTP method.\r\n\r\n  - GET\r\n  ```sh\r\n  \u003e\u003e\u003e curl http://localhost:5000/endpoint-1/\r\n  [{\"id\":1,\"name\":\"data 01\"},{\"id\":2,\"name\":\"data 02\"}]\r\n  ```\r\n  \r\n  - POST\r\n  ```sh\r\n  \u003e\u003e\u003e curl -d '{\"name\": \"data 03\"}' -H 'Content-type: application/json' -X POST http://localhost:5000/endpoint-1/\r\n  {\"id\":3,\"name\":\"data 03\"}\r\n  \r\n  \u003e\u003e\u003e  curl http://localhost:5000/endpoint-1/\r\n  [{\"id\":1,\"name\":\"data 01\"},{\"id\":2,\"name\":\"data 02\"},{\"id\":3,\"name\":\"data 03\"}]\r\n  ```\r\n\r\n  - PUT\r\n  ```sh\r\n  \u003e\u003e\u003e curl -d '{\"name\": \"data 02 edited\"}' -H 'Content-type: application/json' -X PUT http://localhost:5000/endpoint-1/2\r\n  {\"id\":2,\"name\":\"data 02 edited\"}\r\n  \r\n  \u003e\u003e\u003e curl http://localhost:5000/endpoint-1/\r\n  [{\"id\":1,\"name\":\"data 01\"},{\"id\":2,\"name\":\"data 02 edited\"},{\"id\":3,\"name\":\"data 03\"}]\r\n  ```\r\n  \r\n  - DELETE\r\n  ```sh\r\n  \u003e\u003e\u003e curl -X DELETE http://localhost:5000/endpoint-1/2\r\n  {}\r\n  \r\n  \u003e\u003e\u003e curl http://localhost:5000/endpoint-1/\r\n  [{\"id\":1,\"name\":\"data 01\"},{\"id\":3,\"name\":\"data 03\"}]\r\n  ```\r\n\r\n**REMEMBER:** all the data is inside the `db.json` file, so any change with the HTTP method it will also change the file. \r\nConsequently, if change the file, it will change the API.\r\n\r\n**NOTE:** if you edit the json file and add an endpoint with pyjserver running, it will be necessary to restat the application to it load the new endpoint.\r\nBut it is not necessary if you edit the file and add new records.\r\n\r\n## License\r\nMIT\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenavs%2Fpyjserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsenavs%2Fpyjserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenavs%2Fpyjserver/lists"}