Pytterns banner

Pytterns

14 devlogs
27h 55m 29s

RUN THIS BEFORE A VOTE! THIS IS A PROGRAMMER's DREAM

Ever wondered methods to make your terminal based apps look good, without much effort?
This is Pytterns. An extremely easy and beginner friendly framework to spice up your UI.

With…

RUN THIS BEFORE A VOTE! THIS IS A PROGRAMMER’s DREAM

Ever wondered methods to make your terminal based apps look good, without much effort?
This is Pytterns. An extremely easy and beginner friendly framework to spice up your UI.

With Pytterns, you can easily make Good Looking UI with 1 LINE OF CODE! Extremely Beginner Friendly!!

AND IT IS 100% CUSTOMIZABLE AND YOU CAN MAKE YOUR OWN THEMES!

This is the next level of UI Generation!
A LOT more updates coming soon!

This project uses AI

Gemini used for Code Analysis and security check.
Chatgpt used for research
Github Autocomplete in VS for speed & help in tricky patterns

The code in which AI was used is clearly marked with comments.

Demo Repository

Loading README...

Brahmtej the Python Man

V0.1.4 Ready!

Show and Tell 2

I prepared some animations and stuff to show for the show and tell 2. Along with that, prior, I also worked on optimization and building the project to upload the new version to PyPi. I also clicked some pics and added to the images folder.

Changelog

  • Basic Optimization & Bug Fixes
  • Built & Ready to publish update on Pypi
  • Added images and videos
  • Documentation Changes

Challenges

The show and tell was really good, It took me about 30 minutes of work to get everything prepared which I had to show. Along with that, I also built everything and updated the documentation for the new version. There were not any major challenges.

Future Updates

I would be adding more patterns to this very soon!

AI Disclosure

No significant AI was used for this devlog. All the codeblocks which had AI Involvement are marked through comments in the code with full disclosure.


Attached Image: Shows the new 0.1.4 version built and ready to be released!

Thanks for reading this 💖
Stay Tuned!

Attachment
0
Brahmtej the Python Man

My First Show and Tell!

For the show and tell, I made some scripts and designs with pytterns to show to everyone. It was a great experience.


There is no major changelog for this devlog. I just worked on some combinations of functions. All videos are in the github.

Challenges

Not much challenges were faced during this time. Everything went smoothly!

Learning & Overcoming Challenges

I learnt how to speak and display my stuff
I had the experience of my first Show and Tell
I learnt how to combine functions and make a rly good movie kinda thing

AI Disclosure

No significant AI was used for this devlog. All the codeblocks which had AI Involvement are marked through comments in the code with full disclosure.


Video Attached: The comments and reviews I got while showing my project! 🥰💓

Thanks everyone for such a good show and tell, it was a great experience.

Thanks for reading this 💖
Stay Tuned!

Attachment
Attachment
Attachment
0
Brahmtej the Python Man

Shipped this project!

Hours: 13.95
Cookies: 🍪 349
Multiplier: 25.05 cookies/hr

READ ME

This is Pytterns, with Pytterns, you can build 1d, 2d and 3d shapes ALL in your terminals.
You can also make great UI stuff like Panels, Tables, Designs and a lot more things, all from Pytterns.

You may ask, there are other libraries which do the same, and are much bigger than this. Yes, that is true, but they are usually not so beginner friendly.
In pytterns, I have put a lot of effort in storytelling. The entire project has really well explained devlogs and readme, and I have written it to the best of my ability.
While coding as well, I have made sure to actually add something which is useful and would be a good part of the framework.

For Voters:

Hello Voters,I am a beginner python dev and currently 16, I know the devlogs are long and it may take time for you to read those. But I would appreciate if you go through the entire history of the project development and rate it accordingly.
If you cant read the entire thing, you MUST watch all the photos and videos, I have tried to cover everything in those. Please start from the bottom and work your way up.

About Me & Origin of project:

I’m Brahmtej Singh, a beginner python developer. I am currently 16 and am working at hostingkarle.com. As a student studying python at school, there are regular questions on making patterns through loops and logic. Though they are good to promote logical thinking, but to put those patterns in actual production level code, I believe some library had to be made for that. So, I made pytterns. Though my school wouldnt accept it if I write it in the answer sheets, but you have no bounds on integrating this with your next terminal project! :)

I’m really proud of this project, and hope this would be a very successful ship.

Cya! yay

Brahmtej the Python Man

All Ready to Ship! Yay!

Changelog

  • Readme Update
  • Adding Optimization Text in Readme for Sidequest
Attachment
0
Brahmtej the Python Man

Getting ready to ship!

Changelog

  • Added Hacker Rain pt.rain( )
  • Added Cuboid in 3d Shapes
  • Updated readme

Challenges

There weren’t any significant challenge while working on these changes, but it did make me re visit that Ascii centering thing which I made while making the pt.panel() for the hacker rain effect to calculate width properly.

The cuboid is kinda a replica of the cube, with changed coordinates in the array, so that wasnt too hard.

Future Updates

I’ll be adding some example codes in the readme, so its easier for beginners and testers.
I would be shipping this now.

AI Disclosure

No significant AI was used for this devlog. All the codeblocks which had AI Involvement are marked through comments in the code with full disclosure.


Image Attached: Output of hacker rain pattern, with Green base color, 90% Density, 20% WHITE Glitch Chance and prefix ROOT.

Thanks for reading this 💖
Stay Tuned!

Attachment
0
Brahmtej the Python Man

Great Feature Added! (CHECK VIDEO)

This devlog contains a VIDEO, Check it out!

Changelog

  • Added Typewriting
  • Fixed multiline bug with Progress Bars
  • Improved the list of banned words for security

Challenges

I thought, that shapes arent enough. What if we play with text too. So, i created pt.typewrite()through which you can make typing effects in your terminals. It was quite hard, just like the 3d cube because this gives live updates so it had to pass our buffer thing of pytterns. Centering and color system had to be created separately for this, Though this was not hard, it was a bit time consuming.

Learning & Overcoming Challenges

This is a great addition, because through this you can write text to terminal, and like all of the other functions of pytterns, you can customize the speed, color, delay, typing style, and a lot more parameters! I learnt a lot of ASCII Terminal codes from this, like moving the cursor or to blank the screen through just Terminal Codes.

Future Updates

I’ll be working on more things related to text editing. Like BIG Text or something. Its gonna be great!

AI Disclosure

No significant AI was used for this devlog. All the codeblocks which had AI Involvement are marked through comments in the code with full disclosure.


Video Attached: Shows a really good MUST WATCH demo of most of the Pytterns framework and shows how it took over old style terminals and made them ultimate! The video is screen recording of a terminal output of a python code with pytterns.

Thanks for reading this 💖
Stay Tuned!

0
Brahmtej the Python Man

V0.1.3 Released on Pypi

Changelog

  • Working on 3d Revolving of 2d Shapes
  • Added stable release of pt.cube()
  • Fixed security issues
  • Release devlog

Challenges

Not much challenges were faced during this time. Everything went smoothly!

Learning & Overcoming Challenges

I learnt how to display stuff styled in terminal

Future Updates

Working on adding animated text writing stuff, and more 3D shapes.

AI Disclosure

No significant AI was used for this devlog. All the codeblocks which had AI Involvement are marked through comments in the code with full disclosure.


Video Attached: Video shows different stuff properly following 3d rotation rules and flawlessly working!

Thanks for reading this 💖
Stay Tuned!

0
Brahmtej the Python Man

Changelog (WORK IN PROGRESS)

  • Added 3d Rendering of Cube
  • Added documentation for Progress Bar and 3d Shapes
  • Added Security bypass system togglable

Challenges

Making a 3d object show nicely in a 2d terminal is a very hard thing. Almost all the complicated maths which is involved in this is completely out of my understanding. I’m also working on shapes like pyramid and circles/spheres which are MUCH more difficult to render.

Learning & Overcoming Challenges

I learnt how to work with maths
I learnt how to render shapes in terminals

Future Updates

I’ll try to add stuff like custom rotation to the shapes, and transitions and animations, all through ASCII in terminal.

AI Disclosure

Some significant google searching and use of AI was done for this devlog as some really complex math was used to render the cube in terminal. All the codeblocks which had AI Involvement are marked through comments in the code with full disclosure.


Video Attached: Videos of cubes of different sizes and char being rendered through pytterns from 1 Line of code for the user!

Thanks for reading this 💖
Stay Tuned!

0
Brahmtej the Python Man

BIG STUFF! (SEE ATTACHED VIDEO)

Changelog (WORK IN PROGRESS)

  • Started work on adding 3d Shapes in terminal
  • Working on a revolving or static Cube in terminal
  • Working on Security Bypass function (To allow running blacklisted keywords)

Challenges

Making a cube in a terminal, in a framework like pytterns is extremely hard. It needs super complex maths, including weird trigonometry and high level functions. They were EXTREMELY tricky to get right.

Another challenge was to make a formula which worked on ALL the sizes, and also it worked on all the angles.

Most importantly, each line drawn should have its unique identity, so coloring could be done right.

The output had to be bypassed from the pytterns file, and centering had to be processed locally because of the complexity.

Learning & Overcoming Challenges

I learnt how to work with complex arrays
I learnt how to actually draw edges from one point to another in terminal
I learnt how to fetch terminal sizes

Future Updates

Il be adding more shapes and stuff to this to make it actually production ready and usable.

AI Disclosure

Some significant google searching and use of AI was done for this devlog as some really complex math was used to render the cube in terminal. All the codeblocks which had AI Involvement are marked through comments in the code with full disclosure.


Video Attached: Videos of cubes of different sizes and char being rendered through pytterns from 1 Line of code for the user!

Thanks for reading this 💖
Stay Tuned!

0
Brahmtej the Python Man

Changelog

  • Added patterns cache
  • Performance Enhancement

Challenges

Everytime I ran a pattern in a loop, with screen clearing each time, it created a short blank screen, which looked odd. (You can see this in the video in the devlog below)

This was because the framework read the pattern file from disk every single time it ran, causing a slight delay. Even though due to multiple reads, the file goes into the disk cache, it still gave a little visible black screen.

To fix this, I have added caching, which stores the function in ram. We can make it so it preloads functions on boot, else it would keep the function in cache whenever its first run, so till the time the software is running, it always fetches from ram.

Learning & Overcoming Challenges

I learnt how to store stuff in cache/ram
I learnt how to access files repeatedly, really fast
I learnt how disk, disk cache, ram and cpu cache work

Future Updates

More patterns and features, making it more usable in actual real world programs.

AI Disclosure

No significant AI was used for this devlog. All the codeblocks which had AI Involvement are marked through comments in the code with full disclosure.


Video Attached: Its the same video of the devlog below, showing the slight blank screens which are visible on updates.

Thanks for reading this 💖
Stay Tuned!

2

Comments

Brahmtej the Python Man

Sorry! Wrong Video attached

Brahmtej the Python Man

See the devlog below for the right video

Brahmtej the Python Man

New Feature! 🎉

BTW, This devlog contains a VIDEO!! Check it out

Changelog

  • Progress Bars
  • Custom Progress Bar Colors and Char
  • Completely fixed panel Title Coloring
  • Banner Mode added to panel

Challenges

I have added progress bar, This was quite a simple process till the time I decided to add colors and stuff. The code got quite messy as the getattr is blocked for security reasons, I had to take some help from AI to successfully add colors through a bit more complex method. It was quite fun and straightforward process, not much difficulties.

Learning & Overcoming Challenges

I learnt how to make progress bars in python
I learnt how to color stuff properly in ASCII
I learnt how to display live cpu use and other stats in terminal (progress bar graph)

Future Updates

Just progress bars isnt enough, I would be adding a lot more shapes and patterns to this project. Im thinking of adding shapes like a kitty or something just for fun.

Il also work on some multithreading and performance enhancement to reduce the time it takes to display the progress bar, so there is no black blank screens in between.

AI Disclosure

Perplexity was used for code cleanup and fixing bugs I had with coloring. . All the codeblocks which had AI Involvement are marked through comments in the code with full disclosure.


Video Attached: Shows the live graph of cpu usage through Pytterns progress bar

Thanks for reading this 💖
Stay Tuned!

0
Brahmtej the Python Man

This is the first devlog after my previous ship.
I read all your comments, and they are just soo nice. Thankyou for all your support guys. 💝

Changelog (WIP)

  • Lisence typo renamed to License (Thanks for informing in vote review)
  • Working on fixing path system to make project work in compiled/packed environments too (Eg. exe)
  • Working on Tables, Banners, and more shapes
  • Bug in text centering in panel title

Challenges

The program just used normal OS to get the path of the module and detect the patterns/ folder. This worked good in normal day to day running, but if any project which was using pytterns had to be built into an exe or binary, it would stop working due to those path errors, and cause the entire build to be useless. This is fixed now by integrating sys.

Learning & Overcoming Challenges

I have received a TON of positive comments about originality and storytelling, and I cant help but thank you all for all your words. Lots of people seem to plan on using this once this project is complete and is packed with lots of features. Thanks for your motivation and time.


Attached Image: Shows reviews put by users.

Thanks for reading this 💖

Attachment
0
Brahmtej the Python Man

Shipped this project!

Hours: 3.64
Cookies: 🍪 84
Multiplier: 22.99 cookies/hr

Pytterns V 0.1 is all READY!

Pytterns is all set for your next terminal project’s UI.
The framework works flawless, and thanks to my friends, everything is now tested multiple times to ensure it can fit any kind of project with ease.

Do use it once before putting your votes. Download files from github.

Thankyou everyone for supporting me this much in this project through your sweet reviews.

Thanks Hack Club for making this happen!

Good Luck! 💖

Brahmtej the Python Man

Version 1.0

Changelog

  • Fixed all the bugs (Which were found)
  • Added new shapes
  • Documentation IMPROVED

Challenges

The program had some bugs, which made it a bit incompatible with general projects. But thanks to my friend’s help, we overcame all the issues and this is now PERFECT!

Learning & Overcoming Challenges

I have received a LOT of positive comments from ALL OF YOU GUYS! and this is genuinely very big for a little programmer like me. Some of you also helped point out bugs and suggested features, which I implemented.


This was a wonderful project, which would not have been possible without Hack Club, and all the lovely voters 💖

Now, I release Pyttern’s First Stable release.

Version 1.0


Thanks for reading this 💖

Attachment
0
Brahmtej the Python Man

Shipped this project!

Hours: 2.24
Cookies: 🍪 28
Multiplier: 12.43 cookies/hr

The project is ready for shipping.

I have added pt.panel() which is now completely stable and functional. It also supports Individual Line Coloring of content.

Please make sure to run this and have an experience before voting on it. PyPi has the latest Stable release, whereas Github has the all feature version.

Download from Github. That would give access to all the features!

Good Luck Designing!

Brahmtej the Python Man

From now, Il improve my Story Telling, and make this project more fun and more beginner friendly.

I believed that Just Patterns in a terminal isnt enough. What if we had options for making a proper Panel or Checklist style UI.

Version 0.1.1.2

Changelog

  • Added pt.panel()
  • Changed how centering works & stuff to make it more usable

And that’s how I added the pt.panel(), it makes a flawless and easiest to create panel which adapts to content and has TONS of customization, easy to use for beginners. It can be used in Loops to make superb looking Dynamic UI to display information. (Example code in git readme)

Challenges

The BIG challenges here were the changes I had to do in Pytterns.py main file because the color codes were counted as characters by len() , even though they are invisible. This completely messed up the ENTIRE centering system. Also, that white cursor blinking bar thing, was too irritating as it appeared on random areas of the screen while UI was Dynamically Updating.

Learning & Overcoming Challenges

I learnt a LOT while making this, because I haven’t ever messed this much with the terminal ever.

  • I learnt how to hide that white cursor thingy
  • I learnt how to make terminal graphics less lagy (Limitation of previous version solved)
  • I learnt to handle the complex coordinate geometry of ANSI buffers so the user doesn’t have to.

Future Work Includes

  • Better Panel Creation and Editing
  • Creation of Tables
  • Multiple Designs in Panel
  • And More..

AI Disclosure

I used Gemini to help with trickier parts of this update.
Specifically, I used it to nail the math and advanced parts of the panel.py file.
(ANSI codes dont work well with len()..) and to fix some bugs related to border colors breaking due to Content’s Colors.

Thanks for reading this 💖

Attachment
Attachment
0
Brahmtej the Python Man

Shipped this project!

Hours: 5.47
Cookies: 🍪 25
Multiplier: 4.56 cookies/hr

I built Pytterns, an open source library for adding shapes and patterns to your python code with Ease!

With this, Python Devs can add shapes and designs to their terminal software with 1 line of code. This is especially helpful for those who are making software in CLI based OS, where good UI Editing is suggested for clean and mess free code operation.

I learnt a lot of things with this, I learnt github, PyPi, Functions, Colorama, Shutil, and a LOT more.

This was big achievement for me, as it was my first ever publicly launched python library
It is a system in which contributors can add more patterns in the default pack and it would get added in the next update.

I am planning to do a lot of updates in this, and the next big thing which I would be adding would be features to write text in boxes and set them on different areas of screen with ease and add borders and gradient color options.

The challenging part was the security, because anyone could put any malicious file as a template and it would trigger it all. I had to research on AI Tools like chatgpt for a fix for this, and a temp fix which I found which works quite good is a keyword ban method. If a template contains some potentially malicious keywords, it doesnt trigger it.

Although this has lead to a challenge of making the terminal smooth. If we spam the functions to make graphic animations, it works, but it is also a bit lagy. Il be working on that in next update too.

Overall, this feels like a solid project to me, and I hope people use this to make their Terminal UI better once its ready and built completely.
Hope you share your Pyttern Design Templates with me in github. Il be happy to merge them in!

Brahmtej the Python Man

Hello World!
The Basic structure of the platform is working! Security features are also operational and it is working with Linux and Windows Environments.

Custom Patterns can be added through /patterns folder in the project root directory, which is being picked up correctly after version 0.1.1 on PyPi

There are 2 Types of Pattern Templates. The default one and the custom project ones.
Default ones are stored in the library’s root. The Project’s Templates are stored in the /patterns folder in the project’s root, containing .py file for the template.

In the template, from now we MUST define size and center in the function’s define statement. If any other parameter is required, we can just add it in the template file, and it would be picked up by the library by itself and you can use that arg in the function trigger statement seamlessly!

Reply to: “Show your project’s output, not your code editor. Screenshots of code (e.g. VS Code) won’t be accepted — your repo is already linked! Upload a screenshot or video of what your project actually does.”

Images attached below show the running version with custom template. I am not showing the code in the images, thats only for reference if someone wants to replicate, Output is visible in the images

Attachment
Attachment
0