Random String Generator

The title says it all. This was a project I did a while ago and just decided to share. This was originally a random food generator, but, I for some reason started thinking of random songs and phrases. Such as: “Nobody told me life was gonna be this way” and “What is love”. And now it is a random string generator. If this goes well, I might make a POST endpoint to submit strings.

Endpoints:
GET - http://cheesy-tech-api.glitch.me/api/v1/string
GET - http://cheesy-tech-api.glitch.me/api/v1/strings
GET - http://cheesy-tech-api.glitch.me/api/v1/string/:id:
POST - http://cheesy-tech-api.glitch.me/api/v1/string/add (https://reqbin.com/iwervjjz)

(for adding strings, you can use this tool to send a post request to the project)

(Source code coming to a Glitch project near you.)

I will be making a more advanced version of this. i.e. it is going to grab random words from the array and put them together.

3 Likes

Screenshot 2020-09-08 at 7.23.13 AM

Hmm, how random are these :thinking:

I typed these out. lol.

2 Likes

The ID is what string it is. That is what the string/:id if for.

I personally recommend that you use something like the random word API:
https://random-word-api.herokuapp.com/home

1 Like

That is plan 2. In fact, I thought of that today.

1 Like

image

image

image

this is cool

4 Likes

I want ALL the lyrics

I am adding a POST endpoint soon.

1 Like

I made a sentence generator.
$pip install ntlk
$pip install faker
then on the python code do
import ntlk
import faker
while True:
print(colored(print(fake.sentence(ext_word_list=words.words())),random.choice(colors)))
That generates fake sentencees

Nice. I don’t use or like Python that much. So I try to use JS and or Lua as much as possible. (Maybe some HTML if needed.)

Where are you using words and where is ntlk used?

I got “Never gonna give you up” and i thought it was fake XD

words are from the default ntlk array:
array_name = words.words()

but you only did import ntlk you didn’t define words or fake anywhere in the code

I am implementing a POST endpoint. Most likely will be api/v1/string/add.

Done

image

I’ve been wating for this for a day or two

This took an hour to make lol

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

I shall be adding the lyrics to the app. (i need to)

This is super off-toooopic

2 Likes

Oh, I thought you made post requests and bypassed the check.

1 Like

If you want to make a post request, use api/v1/string/add and set the body.

1 Like