You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

bafcode

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bafcode - pypi Package Compare versions

Comparing version
1.0.8
to
1.0.9
+1
-1
bafcode.egg-info/PKG-INFO
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)
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

@@ -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=[