{"id":15297400,"url":"https://github.com/mendelsshop/fstringlt36","last_synced_at":"2026-01-20T01:55:49.228Z","repository":{"id":45013774,"uuid":"423349280","full_name":"mendelsshop/fstringlt36","owner":"mendelsshop","description":"python f-strings for before python 3.6","archived":false,"fork":false,"pushed_at":"2022-05-02T06:14:30.000Z","size":139,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"regex","last_synced_at":"2025-03-15T06:48:22.388Z","etag":null,"topics":["f-strings","python","python2","python3"],"latest_commit_sha":null,"homepage":"","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/mendelsshop.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":"2021-11-01T05:36:07.000Z","updated_at":"2022-02-22T01:34:56.000Z","dependencies_parsed_at":"2022-09-04T22:20:55.405Z","dependency_job_id":null,"html_url":"https://github.com/mendelsshop/fstringlt36","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendelsshop%2Ffstringlt36","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendelsshop%2Ffstringlt36/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendelsshop%2Ffstringlt36/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendelsshop%2Ffstringlt36/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mendelsshop","download_url":"https://codeload.github.com/mendelsshop/fstringlt36/tar.gz/refs/heads/regex","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247446975,"owners_count":20940228,"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":["f-strings","python","python2","python3"],"created_at":"2024-09-30T19:17:08.715Z","updated_at":"2026-01-20T01:55:49.202Z","avatar_url":"https://github.com/mendelsshop.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![tests](https://github.com/mendelsshop/fstringlt36/actions/workflows/test.yml/badge.svg?branch=regex)](https://github.com/mendelsshop/fstringlt36/actions/workflows/test.yml)\n[![flake8](https://github.com/mendelsshop/fstringlt36/actions/workflows/flake8.yml/badge.svg)](https://github.com/mendelsshop/fstringlt36/actions/workflows/flake8.yml)\n[![Upload Python Package](https://github.com/mendelsshop/fstringlt36/actions/workflows/python-publish.yml/badge.svg)](https://github.com/mendelsshop/fstringlt36/actions/workflows/python-publish.yml)\n# fstringlt36 Regex Edition\n# I might finish this after I finish [UMPL](https://github.com/mendelsshop/UMPL), because making a launguage will help me understand how to do this properly.\n## Installation: pip install fstringlt36\n## About: \nPython f-strings for before Python 3.6. using Regex\n\u003cbr\u003e\nThis package should try to emulate all f-string features \u003cbr\u003eby using a class that inherits from str.\n\u003cbr\u003e\nYou can also use it to get newer f-string features in earlier versions of Python.\n\u003cbr\u003e\nsuch as: `h = 'hello'; f'{h = }'`. the ; is just to denonote the end of a line.\n\u003cbr\u003e\nThis package requires the re (regular expressions, regex) module.\n\u003cbr\u003e\nTo my knowledge most versions of Python have re, if not you can use the non regex version\n\u003cbr\u003e\nSo it should be able to install on any Python version.\n\u003cbr\u003e\nAlthough it's not been tested if thats true because it's not working yet.\n\u003cbr\u003e\nOnce I implement all the features I will test it across multiple python version and platforms.\n\u003cbr\u003e\n\n## Features currently working:\n\n### basic variable replacement\n\n```python\n\u003e\u003e\u003e from fstringlt36 import f\n\u003e\u003e\u003e h = \"Hello,\"\n\u003e\u003e\u003e f(\"{h} world\")\nhello world\n```\n#### using the equal operator (I don't know a better name for this and I'm to lazy to look at the document)\n```python\n\u003e\u003e\u003e from fstringlt36 import f\n\u003e\u003e\u003e h = \"Hello,\"\n\u003e\u003e\u003e # instead of doing print(f(\"h = {h}\"))\n\u003e\u003e\u003e # you can do print(f(\"{h = }\"))\n\u003e\u003e\u003e print(f(\"{h = }\"))\nh = 'Hello,'\n```\n#### note:\nplease note to not call `f().f_string_parse()` directly but use the `f()` class.\n\u003cbr\u003e\nif you try to `f_string_parse()` to use directly it will ruin your output and fall back to:\n\n```python\n\u003e\u003e\u003e value = 'error: variable ' + string + ' not found'\n```\n\nwhere value is the replacement string to whatever you put in `{}`.\n\n```python\n\u003e\u003e\u003e from fstringlt36 import f\n\u003e\u003e\u003e var = 'foo'\n\u003e\u003e\u003e s = f(\"{var}\")\n\u003e\u003e\u003e print(s)\nfoo\n\u003e\u003e\u003e t = s.f_string_parse()\n\u003e\u003e\u003e print(t)\nerror: variable value not found\n\u003e\u003e\u003e print(s)\nerror: variable value not found\n# besides for messing up t it will also mess up s because it's a reference to the same object.\n\n```\n## Version: \nVersion Number: 0.0.3\n\u003cbr\u003e\nVersion Stage: alpha\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendelsshop%2Ffstringlt36","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmendelsshop%2Ffstringlt36","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendelsshop%2Ffstringlt36/lists"}