{"id":21522467,"url":"https://github.com/teddyoweh/transvarpy","last_synced_at":"2025-06-21T07:41:14.174Z","repository":{"id":37738808,"uuid":"479110422","full_name":"teddyoweh/transvarpy","owner":"teddyoweh","description":"A new method of declaring and editing variables in python.","archived":false,"fork":false,"pushed_at":"2022-06-30T10:34:15.000Z","size":145,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T15:54:39.832Z","etag":null,"topics":["algorithms","algorithms-and-data-structures","modules","pointers","pointers-and-arrays","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/transvarpy/","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/teddyoweh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-07T18:49:32.000Z","updated_at":"2023-08-29T21:12:37.000Z","dependencies_parsed_at":"2022-07-07T11:03:33.719Z","dependency_job_id":null,"html_url":"https://github.com/teddyoweh/transvarpy","commit_stats":null,"previous_names":["seal-mail/transvarpy","teddyoweh/transvarpy"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/teddyoweh/transvarpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teddyoweh%2Ftransvarpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teddyoweh%2Ftransvarpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teddyoweh%2Ftransvarpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teddyoweh%2Ftransvarpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teddyoweh","download_url":"https://codeload.github.com/teddyoweh/transvarpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teddyoweh%2Ftransvarpy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261087819,"owners_count":23107654,"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":["algorithms","algorithms-and-data-structures","modules","pointers","pointers-and-arrays","python"],"created_at":"2024-11-24T01:10:38.721Z","updated_at":"2025-06-21T07:41:09.161Z","avatar_url":"https://github.com/teddyoweh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pointers in Python\nThis module is a new method of assigning variables in python.\n\nThe most popular languages that have pointers are C and C++, pointers allow a variable to be change by altering the memory address of the variable. \n\n## C Pointers \n```C\n#include \u003cstdio.h\u003e\n\nint main(void) {\n\tint num = 10;\n\t//declaring and initializing the pointer\n\tint *ptr = \u0026num;\n\n\tprintf(\"value of num: %d\\n\", num);\n\tprintf(\"value of num: (using pointer): %d\\n\", *ptr);\n\n\t//updating the value\n\t*ptr = 20;\n\n\tprintf(\"value of num: %d\\n\", num);\n\tprintf(\"value of num (using pointer): %d\\n\", *ptr);\n\n\treturn 0;\n}\n\n\n \n\n```\n\n# Overview\nIn python, there has been one standard way of declaring a variable and no way of editing the varibale name.\nThe ```transvar``` package/algorithm introduces a more efficient way of declaring variables and editing variable name, and gives methods which can be used for large scale programs \u0026 projects.\n\n```Python\nname = 'teddy'\ntemp = '{}_'.format(name) # Adds _ at the end of the name variable ( teddy )\nname = temp \n```\n\n\n\n## Implementation\n ### import modules\n ```py\nfrom transvarpy import transdict\nfrom transvarpy import transfile\nfrom transvarpy import transindv\n ```\n \n ### Basic Implementation\n ```py\n newvar = transvar('name','teddy')\n newvar.init(globals())\n print(name)\n ```\n #### name gets created as a variable with the value name as teddy\n ```sh\n \u003e\u003e\u003e teddy\n ```\n ### Dictionary Implementation \nRather than creating 10 different variables, create a dictionay object, insert the variable name as the key and the content as what you want the variable name to be equals to.\n\n```Python\nmydict = {\n\t'name':'teddy',\n\t'major':'cs',\n\t'language': 'English',\n\t'laptop':'Mac',\n\t'phone': 'Iphone',\n\t'class':'calc 1',\n\t'address':'est drive',\n\t'age':'5',\n\t'food':'burger',\n\t'car':'ford'\n\t}\nfor key,content in mydict.items():\n\ttransindv(key,content).init(globals())\n```\n## OR\n```Python\nmydict = {\n\t'name':'teddy',\n\t'major':'cs',\n\t'language': 'English',\n\t'laptop':'Mac',\n\t'phone': 'Iphone',\n\t'class':'calc 1',\n\t'address':'est drive',\n\t'age':'5',\n\t'food':'burger',\n\t'car':'ford'\n\t}\n transdict(mydict).init(globals())\n```\n10 different variables have been created ( name,major,language,laptop,phone,class,address,age,food and car.\nand when you call the variable name, it prints what has been assigned to it.\n\n```Python\n \nprint(car)\n\n```\n## Output\n```sh\n \n\u003e\u003e\u003e ford\n\n```\n### Files Implementation\n##### Setup File example\n#### SETUP.txt\n```txt\nname = severin\nage = 10\nclass = grade10\ndate = avery\n\n```\n\n```Python\n \n transfile('SETUP.txt').init(globals())\n print(class)\n \n\n```\n## Output\n```sh\n \n\u003e\u003e\u003e grade10\n\n```\nLicense\n----\n\nMIT License\n\nCopyright (c) 2021 Teddy Oweh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\nHire me: `teddyoweh`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddyoweh%2Ftransvarpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteddyoweh%2Ftransvarpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddyoweh%2Ftransvarpy/lists"}