{"id":29048538,"url":"https://github.com/vikyd/to_php_post_arr","last_synced_at":"2026-04-25T08:36:53.969Z","repository":{"id":57476251,"uuid":"114708739","full_name":"vikyd/to_php_post_arr","owner":"vikyd","description":"Convert python dict/list/nested to PHP Array like urlencoded string","archived":false,"fork":false,"pushed_at":"2018-08-09T02:35:32.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T22:53:16.869Z","etag":null,"topics":["array","nested","php","post","urlencoded"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/to-php-post-arr","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/vikyd.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":"2017-12-19T02:17:54.000Z","updated_at":"2018-08-09T02:35:33.000Z","dependencies_parsed_at":"2022-08-30T13:01:43.358Z","dependency_job_id":null,"html_url":"https://github.com/vikyd/to_php_post_arr","commit_stats":null,"previous_names":["viky-zhang/to_php_post_arr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vikyd/to_php_post_arr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fto_php_post_arr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fto_php_post_arr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fto_php_post_arr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fto_php_post_arr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikyd","download_url":"https://codeload.github.com/vikyd/to_php_post_arr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikyd%2Fto_php_post_arr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32255790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T04:23:17.126Z","status":"ssl_error","status_checked_at":"2026-04-25T04:21:53.360Z","response_time":59,"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":["array","nested","php","post","urlencoded"],"created_at":"2025-06-26T18:07:24.403Z","updated_at":"2026-04-25T08:36:53.939Z","avatar_url":"https://github.com/vikyd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Convert python dict/list/nested to PHP Array like urlencoded string\n\n\u003e [中文说明](https://github.com/vikyd/to_php_post_arr/blob/master/README_cn.md)\n\n\n## Install\n\n```sh\npip install to_php_post_arr\n```\n\n\n## Usage\n\n\n```py\nfrom to_php_post_arr.convert import recursive_urlencode\n\na = [1, 2]\nprint(recursive_urlencode(a))\n# 0=1\u00261=2\n\n\na2 = (1, '2')\nprint(recursive_urlencode(a2))\n# 0=1\u00261=2\n\n\nb = {'a': 11, 'b': 'foo'}\nprint(recursive_urlencode(b))\n# a=11\u0026b=foo\n\n\nc = {'a': 11, 'b': [1, 2]}\nprint(recursive_urlencode(c))\n# a=11\u0026b[0]=1\u0026b[1]=2\n\n\nd = [1, {'a': 11, 'b': 22}]\nprint(recursive_urlencode(d))\n# 0=1\u00261[a]=11\u00261[b]=22\n\n\ne = {'a': 11, 'b': [1, {'c': 123}, [3, 'foo']]}\nprint(recursive_urlencode(e))\n# a=11\u0026b[0]=1\u0026b[1][c]=123\u0026b[2][0]=3\u0026b[2][1]=foo\n\nf = ['测试中文']\nprint(recursive_urlencode(f))\n# test chinese \n# 0=%E6%B5%8B%E8%AF%95%E4%B8%AD%E6%96%87\n\n```\n\n## PHP urlencoded Array Data\n- http://php.net/manual/en/faq.html.php#faq.html.arrays\n\n\n\n## Test\n```sh\ncd tests\n\npython -m unittest test_convert\n```\n\n\n\n## Thanks \n- code: https://stackoverflow.com/a/4014164/2752670\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikyd%2Fto_php_post_arr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikyd%2Fto_php_post_arr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikyd%2Fto_php_post_arr/lists"}