All
Pinned posts
TheDrone7
KAJAM ENDS
TheDrone7
Monthly Repls - September 2021
TheDrone7
Repl Talk Rules and Guidelines [README]
katyadee
🐶Introduce yourself! 🐶
Mosrod
Guide to Asking Coding Questions
NotTani
NotTani shared a Repl
2 days ago
0
ANSI Codes
ANSI Codes
Tutorials
Python
Adding color to your repl
This is a tutorial for adding colorful text to your repl in Python. A basic understanding of Python syntax (specifically strings) is assumed. If you're not quite sure if that describes you yet, have a browse through the official Python tutorial. Enjoy! An introductory story Hi replit! Let's say you're programming a massive fantasy text-based RPG game in Python and it's checking all the boxes: great dialogue, fun combat, dozens of items and tools. It has everything -- or so you think. You decide to show it to your friend Brian, and while he is impressed by the boss fight with the Great Wyvern and loves the carefully crafted opening credits, he makes a small offhand comment that ruins your day: "I love it, but it's just white text on a screen". This gets to you, and you say one or two works you regret. You vow that your next game will be as colorful as it possibly can, just to spite him. Even after you apologize, the idea for using color in your game remains, tugging at you in the back of your mind. How do you do it? Haunted by this idea, you wake up in the middle of the night and decide to do it. After some frantic Google searches for "python text colored" and "how to make text in terminal red", you might find several ways to do it, but the nuances aren't quite clear from the outset. In this tutorial, I'd like to show you how to print colored text, clear the mystique, and spite Brian while you're add it, using the popular package "colored". Note: if you have an aversion to using other peoples code, or otherwise don't want to add another dependency to your project you can accomplish all of this and more using "ANSI escape codes". They are very powerful, and a bit beyond the scope of this tutorial, but give them a DuckDuckGo search if you're interested. The code we'll be "painting" is a little one-line snippet from the dialogue of an RPG. These methods, of course, can be applied to almost anything, but I thought this would be particularly appropriate. print("The terrifying wyvern, with matted yellow fur and red bloodshot eyes, stomps towards you, fangs glistening white.") The Process We'll be using colorama, a popular Python package for all sorts of terminal formatting. First, we have to import it be adding this line to the top of our file: import colorama colorama.init() # While it doesn't have any effect on repl.it, if you were to download this code on a Windows system, it wouldn't work without this statement. If you are writing code on replit, it should find these statement and automatically install the package when you first run the code. Let's make the "yellow" and "red" in the line actually yellow and red. We do this by adding a special variable right before the work and a special reset sequence right after, to ensure that our whole line isn't red or yellow. Here's what it looks like: print("The terrifying wyvern, with matted " + colorama.Fore.YELLOW + "yellow" + colorama.Fore.RESET + " fur and " + colorama.Fore.RED + " red" + colorama.Fore.RESET + "bloodshot eyes, stomps towards you, fangs glistening white.") As you can see, we have to end the string within the print statement right before the part we want to color, then "add in" our color code (colorama.Fore.). When we want to stop coloring, we "add in" colorama.Fore.RESET to make things go back to normal. The colors colorama provides you (for you copying and pasting pleasure) are colorama.Fore.BLACK, colorama.Fore.RED, colorama.Fore.GREEN, colorama.Fore.YELLOW, colorama.Fore.BLUE, colorama.Fore.MAGENTA, colorama.Fore.CYAN, colorama.Fore.WHITE, colorama.Fore.RESET. If you're interested, here is a link to the documentation of colorama. In the interest of being concise, I haven't shown you everything it has to offer, and you can do all sorts of interesting things with it. You may need to scroll down a bit. Back to our story So, with your newfound knowledge, you add color codes to all sorts of places in your game, and it works! You show it to Brian again and he is astounded by the brilliant color you've put everywhere. You two make up, and decide that with your knowledge, you'll make a new game together. The end. If you have any questions about colors, or coding in general, or feedback on this tutorial, please don't hesitate to reach out in the comments! Apologies for my long-windedness. Happy coding!Read full post
RECENT REPLIES
MrVoo
MrVoo 2 days ago
@NotTani Protip: DON'T USE COLORAMA, it's an extra import and a wasted five seconds, time I could have spent staring at the ceiling.
NotTani
NotTani 2 days ago
@MrVoo That's a fair point, and while my initial plan was write a two-part tutorial, the first focusing on colorama and the second focusing on raw ANSI Escape Codes, it felt a little out of scope for the length that it already was. I thought that ANSI Escape Codes might be a little intimidating for beginners, and you do need a module like colorama if you want to run your code on a platform such as Windows. I appreciate the feedback, and I will add an additional note about loading times. Thanks for the feedback!
MrVoo
MrVoo 2 days ago
@NotTani anytime ;)
fauzulazmi
fauzulazmi shared a Repl
2 days ago
0
Sayang
Sayang
Tutorials
HTML, CSS, JS
Tagagaga
Gabava Bshshs Bababbaa Hahahaya Aku cinta kam Hahaytststwyqwo Jaustqpqpuayhs Kaya atqussnsgs Iauayayyayya walau syg Read full post
RECENT REPLIES
WaiRowley
WaiRowley 13 hours ago
@fauzulazmi What is your point??? I also cannot see the video you upload above. Can you fix? [geometry dash](https://geometrydash-free.com)
RyanCheung1
RyanCheung1 shared a Repl
2 days ago
0
Interacting to do list
Interacting to do list
Tutorials
HTML, CSS, JS
To Do List
This is a tutorial on how to make a to-do list! first, you would need to create a div with any name(mine is "list")insert this in HTML then you would insert this is JS this code would save the list in the local storage, so next time you can access it! }Read full post
Sara3015
Sara3015 shared a Repl
3 days ago
0
Random Number Generator
Random Number Generator
Tutorials
C#
RANDOM NUMBER GENERATOR - THE TUTORIAL [C#]
Hey there, in this repl I hope to teach you how to use the random number generator function properly in C#. I also included a few comments, so make sure you read the markdown / README.md Hope you like it :DRead full post
CameronJackson7
CameronJackson7 shared a Repl
4 days ago
0
NEAT Snake
NEAT SnakeUsing NEAT to teach an AI how to play snake
Tutorials
Python
Teach an AI to play snake
Before we start This is a continuation of the snake tutorial offered by Replit that can be found here: Snake. Additionally, I would recommend watching the following YouTube video on how NEAT works to give you a better understanding of what we will be doing: MarI/O The Tutorial Unfortunately it was too long to just post here so the step by step tutorial can be found here: Tutorial AI-Camp If you're interested in learning more about AI, head over to AI-CampRead full post
Maryo-Khowijaya
Maryo-Khowijaya shared a Repl
5 days ago
0
Mean, max, and min with Singly Linked List
Mean, max, and min with Singly Linked List
Tutorials
C
Finding mean, max value, and min value using Singly Linked List (Data Structures in C)
Finding mean, max value, and min value using Singly Linked List (Data Structures in C) Youtube: Maryo Khowijaya Twitter / Instagram: ryotaryoichiRead full post
cdasdasdasf
cdasdasdasf shared a Repl
6 days ago
0
CxryzNFT Generator
CxryzNFT Generator
Tutorials
Python
Discord TOKEN Generator | HCaptcha Bypass | 24/7 Replit | 2021 November
Discord token generator enjoy! generator disk post trent cow sheet discordtokengeneraotr,discord,token,generatorRead full post
JakubOleszek
JakubOleszek shared a Repl
6 days ago
0
ProModer
ProModer
Tutorials
Python
Bot
Bot djdjdjdjdjdjdkd djssjksskdkd snsskskskskdkdksksksksskslsjsjssbs sjsjskskskdkdjejRead full post
Lav-MallMall
Lav-MallMall shared a Repl
6 days ago
0
spy-selfbot-v4-7
spy-selfbot-v4-7A python selfbot which supports bot token too!! Banall and kickall working Every command is totally exclusive. Give Credits if you skid it somehow, ;). Use on boost to get the best experience. Your token won't get leaked, as the inputs are in console and not in the project code.
Tutorials
Python
k
ishh bft nero nr 5iv ry66ongvf jb6ibnfieob;wqrb44444444444444444444444v1iocxdsCvbbbbbbbbt5t Read full post
MattDESTROYER
MattDESTROYER shared a Repl
1 week ago
1
Simple String Tokeniser
Simple String TokeniserA simple program to demonstrate parsing a string into tokens.
Tutorials
Node.js
Parsing Strings into Tokens (JavaScript)
In this tutorial, you will (hopefully) learn how to parse a string into a number of tokens which can be very useful in some circumstances. First of all, let's establish what I mean by string tokeniser. Tokenisation is the act of breaking up a string into useful parts. For example, if we wanted to tokenise a simple equation like 2 + 3 = 5, we would break up our equation into 5 different parts, 2, +, 3, =, 5. In this example there are three types of tokens: numbers, operators, and separators. It's probably obvious which are the numbers (2, 3, 5) and which are the operators (+, =). That just leaves spaces ( ) to be separators (meaning a token that separates other tokens). In some cases (like the above example), we want separators to separate tokens, but we don't actually want them to be tokens. We might alternatively just not want whitespaces (which are spaces, tab characters, and line breaks). Let's get started! To begin with, let's create an object called Tokeniser, which will eventually contain everything we need to tokenise a string. const Tokeniser = { }; To allow our tokeniser to be easily customisable, we will create a property called settings which will contain three arrays and two booleans named; operators, separators, groupers, keepWhiteSpacesAsTokens, and trimTokens. If it wasn't already clear, we will be using these 'settings' to tokenise each string. settings: { operators: [], separators: [], groupers: [], keepWhiteSpacesAsTokens: true, trimTokens: true } Next let's create a simple function property to check what type of token each character is. To do that we are going to check if any of the token arrays contains the input character. tokenType: function(char) { if (this.settings.operators.includes(char)) { return "operator"; } else if (this.settings.separators.includes(char)) { return "separator"; } else if (this.settings.groupers.includes(char)) { return "grouper"; } return "other"; } Alright now we're ready to start parsing our string into an array of tokens! parseString: function(str) { } First thing's first, we need to make sure the input is a string: if (typeof str !== "string") { if (typeof str === "object") { str = JSON.stringify(str); } else { str = str.toString(); } } Next we need two temporary local variables, the first will be an array that will contain each parsed token in order, the second will be a string containing the current token which will be pieced together character by character. let tokens = [], _tempToken = ""; Next is the hard part. We need to loop through our string, evaluate each character and see if it is the same type of token as the current token we are creating. If it isn't we know we are starting a new token and we can push the previous token to our array of tokens. for (let i = 0; i ", "=", "+", "-", "*", "/", "?", "!"); Tokeniser.settings.separators.push(",", ".", ";", ":", " ", "\t", "\n"); Tokeniser.settings.groupers.push("(", ")", "[", "]", "{", "}", '"', "'"); Tokeniser.settings.keepWhiteSpacesAsTokens = false; `Read full post
PVPPRO
PVPPRO shared a Repl
1 week ago
0
Python
Python
Tutorials
Python
Concatenate error
hi i am doing a python sheet for school and I came across this error, idk how to fix is it so I would gladly appreciate for some helpRead full post
RECENT REPLIES
JustCoding123
JustCoding123 1 week ago
@PVPPRO In line 5 you have a `,` that shouldnt be there. Line 5 should be: `surname = input()`
PVPPRO
PVPPRO 5 days ago
@JustCoding123 i meant in line 12 what do I do to fix that?
PVPPRO
PVPPRO 5 days ago
oh wait nvm thx
INTERSTREAMER
INTERSTREAMER shared a Repl
1 week ago
0
ChappyTest-1
ChappyTest-1random
Tutorials
Python
Chapterizing
What a hack I am. I found a project I wanted to run, just to see what it can do. I followed the instructions and ... I have no idea what do ? I see it added lots of installs, but how do you actually test it>? I think it needs a youtube URL to add as a test, but it doesn't ask for one? Sigh. Any clue where I can look to give the novice a step by step of this process?Read full post
superguy123456
superguy123456 shared a Repl
1 week ago
0
for loop tutorial
for loop tutorial
Tutorials
Python
for loop tutorial
learn the basics of a fairly easy loop! Now first what you need to now is that a for loop is use for repeating/implementing lines of code to a certain extent. In this loop you must know the start number and the end number. In the for loop you can also have two types: a sequence or a range version! The sequence one will write/print only what is given in parenthesis while the range will print all the numbers from start to END NUMBER -1. It excludes the last number. Ex: say you wanted to write numbers 1-20 with a for loop you can't write thisYou would have to write print(val) For a sequence say you needed to write out a string maybe "hello", then you would write: print(val) The term val stands for value. now if you want to see the range version of the for loop in action then click this link 🔽. https://replit.com/@superguy123456/math-helper?c=141520Read full post
superguy123456
superguy123456 shared a Repl
1 week ago
0
draw freely!
draw freely!
Tutorials
Python
this is a drawing app!
now if you can't read the python then here are the commands: 1=right 2=left 3=forward 1(20)=20 degrees to the right 1(50)=50 degrees to the right 2(20)=20 degrees to the left 2(50)=50 degrees to the left 3(100)=100 pixels forward p(u)=pen up p(d)=pen down p(r)=pen color red p(o)=pen color orange p(y)=pen color yellow p(g)=pen color green p(bl)=pen color blue p(p)=pen color purple p(b)=pen color black p(w)=pen color white b(r)=background color red b(o)=background color orange b(y)=background color yellow b(g)=background color green b(bl)=background color blue b(p)=background color purple b(b)=background color black b(w)=background color whiteRead full post
RECENT REPLIES
superguy123456
superguy123456 1 week ago
@hg0428 wait really! I thought that you could just fork it
hg0428
hg0428 1 week ago
@superguy123456 Yes, we can fork it, I am just saying that we can't use it without forking it.
superguy123456
superguy123456 1 week ago
@hg0428 ok
MushyAvocado
MushyAvocado shared a Repl
1 week ago
1
tutorial for es6
tutorial for es6
Tutorials
HTML, CSS, JS
BASIC ES6 FEATURES
BASIC ES6 FEATURES Hope this helps! let and const let is very similar to var. You can read about the difference here. const is short for constant. It does just that. Its value can't be changed, or it will throw an error. This does not apply to the properties of the constant. They can be changed. Arrow functions Arrow functions are a really nice shorthand for a function definition. It goes like this: // Or let or var const functionName = (arg1, arg2, arg3) => { // stuff goes here }; You can also do it on a single line. It returns whatever the output is. Example: `const baz = (num1, num2) => num1 + num2; baz(10, 5); // output: 15` Classes These are the best new feature. You know how object inheritance is a pain with prototype-based OOP? It's really easy with classes. Like this: // Define the class class Person { // This is what's called on object creation constructor (name, mood) { this.name = name; this.mood= mood; } // This is how you define a method greet () { console.log('Hello I\'m ' + this.name); } myMood () { console.log('My mood is: ' + this.mood); } } const person = new Person('Mushy', 'code'); person.greet(); // Output: Hello I'm Mushy // Coder inherits Person class class Coder extends Person { constructor (name, username) { // The "super" keyword references the parent // Inside the constructor, it is the corresponding constructor // on the parent. super(username, 'code'); this.username = username; } profile () { console.log('My profile is https://replit.com/@' + this.username); } } const mushy = new Coder('Mushy', 'MushyAvocado'); mushy.greet(); // output: Hello I'm Mushy mushy.profile(); // output: My profile is https://replit.com/@MushyAvocado `Read full post
RECENT REPLIES
Mojo1001
Mojo1001 1 week ago
@MushyAvocado thanks for the tutorial :)
mohamedmagdy26
mohamedmagdy26 shared a Repl
2 weeks ago
0
asdtato1
asdtato1
Tutorials
Python
chang
chrome and Mozilla Firefox and Chrome and let you know that I have a great day ahead to nextRead full post
LordSoloOfficial
LordSoloOfficial shared a Repl
2 weeks ago
0
Application Programming Interface // api
Application Programming Interface // api
Tutorials
Node.js
How To Make An Application Programming Interface
How To Make An Application Programming Interface | Api. What Is An Api: An Api Is A Connection Between Computers Or Between Computer Programs. It Is A Type Of Software Interface, Offering A Service To Other Pieces Of Software.Read full post
cjmatthy09
cjmatthy09 shared a Repl
2 weeks ago
0
manimtest123
manimtest123
Tutorials
Python
Making math animations like 3Blue1Brown
Prerequisites Know Python to the extent of classes and basic library usage Know how to read docs \--> There is quite a lot of docs and examples for Manim at their website's docs page. Know how to use the packager and Replit in general (this should always be met, judging by how you got here) Know LaTeX/TeX (to some extent, you can also copy and paste the code from CodeCogs, and this is optional unless you want to use math notation) Intro You may have thought: How does 3b1b make their animations? Manim. We're going to use the community edition and 1 more library which allows repls to use LaTeX. Create a Python repl, then go to the packages tab, so that you don't have to run pip install everytime. Search for these 2 packages and click the plus to install: manim and manim-onlinetex. These will take a while to install, I think there's 27 dependencies total, including SciPy which takes a bit because it's so big. Once you're done, move on to step 2. Template Create the following file with the name .replit: Put in the file: run="manim -ql main.py " Replace ` with your name of choice, such as MainScene or TransformExampleScene`. No spaces, and I generally wouldn't recommend snake_case because in Manim that's not how we do it, except for function names inside the class. Then, in your main.py file, put the following: from manim import * from manim_onlinetex import * class (Scene): def construct(self): circle = Circle(radius=2, color=BLUE, fill_opacity=0.5) # make a circle with r=2, a lightish blue color, and a filled (but translucent) lightish blue inside square = Square(sidelength=4, color=BLUE, fillopacity=0.5) # Make a square with the same side length as the diameter of the circle label = Tex(r"Magic!").shift(UP*3) # Make fancy TeX text that says Magic!, use MathTex(r"contents") for mathematics TeX (LaTeX) play the animation self.play(Create(circle)) # Create the circle with a fancy technique self.play(Transform(circle, square)) # Transform the circle into a square, magic! self.wait(1) # Wait 1 second self.play(Write(label)) # Say how it's magic! self.play(FadeOut(square, circle, label)) # Fade out to black, say we're heroes, get a Emmy or something, I don't know self.wait(1) # Wait 1 second before ending the video, then end it Replace ` with your name of choice from the previous step, such as MainScene or TransformExampleScene` like I said earlier. The comments in the code should explain everything. There are a lot of preexisting animations in Manim, and self.play(AnimationHere(...Mobject[])) will play the animation of all of the Mobjects inside the animation function inside the parentheses. Mobjects are part of the core of Manim. It involves every... object. Polygons, LaTeX, you name it! The major thing that isn't a Mobject however is the majority of things that act upon them, such as Write, FadeOut, Create, or Transform, aka animations. You can create your own, but that's a bit more advanced and we won't cover that, but the Manim docs cover it well. You now have a basic graph on coding Manim, but where is the result? Configuration To answer that previous question, it's easy. Click the folders inside the media folder a bunch to open them all. You should find a folder named 480p15. That's the resolution and frames per second of the video. You should see, inside that folder, a video named .mp4, which is, you guessed it, the name of the scene. Ignore the partialmovefiles, that's just so that big rendering and prototyping don't take as long by storing each animation in that folder. How can I make it more than 480p15? To make it higher than pixel-y 480p15, go back to your .replit file and change -ql to -ql, -qm, -qh, or -qk, for medium, high, and 4k quality, respectively. What can you do with this/What's the best you can create? The possibilities are only limited by what you want to code. I made a video on making a very bad Pi series here and the source code for that video is here. The code is 237 lines long, but I didn't use very many helper functions at all, and if I did, it'd be significantly shorter. Anyways, that's about it. Make sure to check out the Manim docs link in the Prerequisites step to learn more. Thanks for reading! -cj Read full post
RECENT REPLIES
SixBeeps
SixBeeps 2 weeks ago
@cjmatthy09 Ooo a manim tutorial. Nicely done!
cjmatthy09
cjmatthy09 2 weeks ago
@SixBeeps thanks
NurAini34
NurAini34 shared a Repl
2 weeks ago
0
TechnicalOffensivePrograms
TechnicalOffensivePrograms
Tutorials
HTML, CSS, JS
Buka ya :)
#include using namespace std; int main(){ printf("sapa aku dong : " ); scanf("tekan"); printf("\nudah kenyang :) : "); return 0; }Read full post
MCB7
MCB7 shared a Repl
2 weeks ago
0
Introduction-to-html
Introduction-to-html
Tutorials
HTML, CSS, JS
Introduction to HTML5 / CSS and Javascript
This is an introduction to HTML from the very base of HTML to styling with CSS and more complexe user interaction using Javascript. The file is still a work in progress but will be soon complete. I hope can help you have a better understanding of the fundamentals of website creation.Read full post
RECENT REPLIES
MrVoo
MrVoo 2 weeks ago
@MCB7 CSS could use some polishing, and you should add the basics of JavaScript as well as changing what's on screen with it. Other than that, nice :>
MCB7
MCB7 2 weeks ago
@MrVoo I plan to extend the css section and of course complete JS very soon. This is a work in progress and I still need to figure out what works or not as a teaching support.
dangtc12
dangtc12 shared a Repl
2 weeks ago
0
Hentaiz.web
Hentaiz.web
Tutorials
HTML, CSS, JS
my first website
Urg this so yeah brrr and i am lazy bois this project i made it in 1h48 i learn some source in google and trying to remake them.Read full post
HeavyMetal
HeavyMetal shared a Repl
2 weeks ago
0
Monster Hunter
Monster HunterIn my game you're a monster hunter looking for the king monster to save your world, before it's too late, update 3.0
Tutorials
Python
SUSSSUSUS
You can style your post with a limited set of Markdown. Here are some supported content types: Bold Text bold Italic Text italic Links Link Name Images Image alt text Code Blocks this is for large, multiline code blocks Inline Code this is for code in the middle of sentencesRead full post
sn236
sn236 shared a Post
2 weeks ago
3
A guide to Scss and Mixin
Tutorials
Hi 👋 This is my first tutorial. :) So this is related to scss or sass which is a pre-processor for css which can't be run on repl unfortunately (I seRead full post
RECENT REPLIES
VulcanWM
VulcanWM 2 weeks ago
Nice!
RyanPlahs
RyanPlahs shared a Post
2 weeks ago
2
fun game Mad-Libs
Tutorials
Hello every one my fans lol. I have a fun game it is called Mad-Libs when you click run click space and the enter a noun or what ever you need to. Do
UnrulyFaithfulMining
Python
Read full post
RECENT REPLIES
RyanPlahs
RyanPlahs 2 weeks ago
ps plz tell me how to publish game like other people do.
danielmax1
danielmax1 shared a Repl
2 weeks ago
0
Discord-MusicBot-5
Discord-MusicBot-5An advanced discord music bot, supports Spotify, Soundcloud, YouTube with Shuffling, Volume Control and Web Dashboard with Slash Commands support!
Tutorials
Node.js
Damn
Nj dman jd d. Dm d d d d d d d d d d e d d d dRead full post
BD103
BD103 shared a Repl
2 weeks ago
1
Flask Rich Example
Flask Rich ExampleThis is an example of using the Flask-Rich extension for Python.
Tutorials
Python
Guide to Flask Rich
Flask-Rich is a Python package that I recently made. It makes developing Flask applications a lot easier. Background Rich is a programming library that I discovered a year back. It allows functionality for tables, fancy prompts, and more. An example of Rich > The Rich API makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the box. What does Rich-Flask do? It adds many Flask-specific features with a lot of customizability. Here is an example: Rich's logging with Flask Installation There are different installation processes based on different environments. Choose yours: PIP Poetry Replit Git PIP Installing Flask-Rich with PIP is very easy. If you want it global (available to all projects), type: Also updates an existing version if you already have it python -m pip install -U flask-rich If you are using a virtual environment, try this: Create venv python -m venv .venv Activate source .venv/bin/activate Install python -m pip install -U pip python -m pip install -U flask-rich Poetry This environment is even easier than PIP! Make sure you have an existing pyproject.toml file with poetry init: poetry add flask-rich For more information on using Poetry, check out their website here. Replit If you don't have a home computer, you can use Replit. Follow this guide here and type in flask-rich. Git If you want the most bleeding-edge tech, you can clone the repository with Git. This version is most likely unstable and may have unresolved bugs! Git git clone https://github.com/BD103/Flask-Rich.git cd Flask-Rich/ Poetry poetry lock poetry install poetry shell You can then make this global by running the following (not recommended): poetry build cd dist/ Replace the asterisks with the version pip install -U Flask_Rich-..*-py3-none-any.whl Usage Flask-Rich works like a classic Flask extensions. It is a class that you pass the app object into. Single File app.py from flask import Flask from flask_rich import RichApplication app = Flask(name) rich = RichApplication(app) @app.route("/") def index(): ... RichApplication initializes everything necessary. Multiple Files (Complex Projects) If you use a more complex project structure and want to avoid circular imports, you can have a project structure like this: project/ init.py app.py bridge.py ... bridge.py from flask_rich import RichApplication You can also import other extensions like Flask-SQLite rich = RichApplication() app.py from flask import Flask from .bridge import rich def create_app(name: str) -> Flask: app = Flask(name) rich.init_app(app) ... return app Configuration Flask-Rich gets its configuration from the Flask.config object. All options have the RICH_ prefix and can be found here. For the configuration to work, it has to be set before initializing your RichApplication instance. If you pass your app into RichApplication on its creation (like the single file example), you have to set the config before even creating this object. app = Flask(name) app.config["RICHLOGGINGMARKUP"] = False rich = RichApplication(app) If you use the RichApplication.init_app(app) function (complex project example), you just have to set the config before then. app = Flask(name) rich = RichApplication() app.config["RICHTRACEBACKSHOW_LOCALS"] = True rich.init_app(app) Contributing Rich-Flask is a generally small codebase. With the core file less than 100 lines of code as of version 0.3.0, there's not much room for confusion. If you have any suggestions for the package, do tell! I check Github regularly, so a nice comment in the issues section of the repo is very helpful. Thank you for checking out my corner of the internet! You can find me making the occasional blog post and coding project. Special thanks Will McGugan for the Rich libary and the people at Pallets for Flask. Bye! :>Read full post
RECENT REPLIES
CodingCactus
CodingCactus 2 weeks ago
@BD103 pretty sweet!
BD103
BD103 2 weeks ago
@CodingCactus Thank you :D
viraaj9jatin
viraaj9jatin shared a Repl
2 weeks ago
0
calculator
calculator
Tutorials
HTML, CSS, JS
hello everyone
does anyone is new to replit and want to learn the features of the replit and want to learn html ,css and some of js the he/ she can join this team https://replit.com/teams/join/wwztmqxoaedgaxylbrqdsgmdpxqujbru-teamneon i will teach through the chat of replit and if necessary i will use zoom cloud meetings to share my screen i will be online at between 4:00PM to 6:00PM soon i will increase the time limit and days of being online thanks regards viraaj9jatinRead full post
RECENT REPLIES
viraaj9jatin
viraaj9jatin 2 weeks ago
(sorry i forgot to add extra information) does anyone want to create this type of repl
BenjaminBerger3
BenjaminBerger3 shared a Repl
2 weeks ago
0
Calculator
Calculator
Tutorials
Python
Calculator
Calculator that calculates stuff, made in python. Read full post
RECENT REPLIES
MrVoo
MrVoo 2 weeks ago
@BenjaminBerger3 Make it easier to read and remove the password
ManojRathod2
ManojRathod2 shared a Repl
2 weeks ago
0
Jee mains cutoff
Jee mains cutoff
Tutorials
HTML, CSS, JS
Jee mains iiit Surat cutoff for st catagory
This post helps to know the cutoff off iiit Surat which is located in Gujarat state and this Institute offers teo branches they arae cse and ece which core branches and this Institute average package is 12 lakhs and highest package is 41 lakhsRead full post
fhdwHyd
fhdwHyd shared a Post
3 weeks ago
0
#help
Tutorials
Requesting Commands? Prefix is M! User commands M!wiki Search Wiki Results . DF!google Search Google Results . M!youtube Search Youtube Results . M!
جوال
Python
Read full post
RECENT REPLIES
fhdwHyd
fhdwHyd 3 weeks ago
ok
Load more