bafcode
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: bafcode | ||
| Version: 1.0.8 | ||
| Version: 1.0.9 | ||
| Summary: BafCode Framework CLI | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/aitelabranding/bafcode_cli |
@@ -1,44 +0,31 @@ | ||
| class PromptContext: | ||
| @staticmethod | ||
| def snake_to_camel(word): | ||
| formatted_word = word.replace('/', '_') | ||
| return ''.join(x.capitalize() for x in formatted_word.split('_')) | ||
| def format_word(word): | ||
| """Convert snake_case or a format with slashes to CamelCase.""" | ||
| formatted_word = word.replace('/', '_') | ||
| return formatted_word | ||
| return ''.join(x.capitalize() for x in formatted_word.split('_')) | ||
| @staticmethod | ||
| def format_word(word): | ||
| """Format word by replacing slashes with underscores.""" | ||
| return word.replace('/', '_') | ||
| @staticmethod | ||
| def context(prompt_name): | ||
| camel_case_name = PromptContext.snake_to_camel(prompt_name) | ||
| formatted_word = PromptContext.format_word(prompt_name) | ||
| file_context= """ | ||
| file_context = """ | ||
| from core import BafLog | ||
| # Optionally, import any other required modules or packages | ||
| class {prompt_name}: # Replace {prompt_name} with the name of your prompt | ||
| def {function}(data): | ||
| prompt = {string} | ||
| class {prompt_name}Prompt: # Replace {prompt_name} with the name of your prompt | ||
| def {function}_prompt(data): | ||
| prompt = {string} | ||
| {prompt_name} Data: | ||
| {data} | ||
| {string} | ||
| return prompt.format(data=data) | ||
| {{data}} | ||
| {string} | ||
| return prompt.format(data=data) | ||
| """ | ||
| return file_context.format(prompt_name=camel_case_name, string='"""',function=formatted_word) | ||
| return file_context.format(prompt_name=camel_case_name, string='"""', function=formatted_word) |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: bafcode | ||
| Version: 1.0.8 | ||
| Version: 1.0.9 | ||
| Summary: BafCode Framework CLI | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/aitelabranding/bafcode_cli |
+1
-1
@@ -5,3 +5,3 @@ from setuptools import setup, find_packages | ||
| name="bafcode", | ||
| version="1.0.8", | ||
| version="1.0.9", | ||
| packages=find_packages(), | ||
@@ -8,0 +8,0 @@ install_requires=[ |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
16149
0.64%294
1.38%