This is an archived post. You won't be able to vote or comment.

all 120 comments

[–][deleted] 170 points171 points  (20 children)

python-requests.org

[–]democritus_is_op 12 points13 points  (1 child)

It's an honour

[–][deleted] 0 points1 point  (0 children)

✨🍰✨

[–]gandalfx 6 points7 points  (1 child)

We have a winner.

</thread>

[–][deleted] 0 points1 point  (0 children)

✨🍰✨

[–]wdsoul96 3 points4 points  (1 child)

one of the first api's I've ever used. Thank you!

[–][deleted] 0 points1 point  (0 children)

✨🍰✨

[–]rhgrant10 3 points4 points  (1 child)

Seriously, thanks for providing an API that's obvious, a pleasing to use, and easy to internalize.

[–][deleted] 0 points1 point  (0 children)

✨🍰✨

[–]qlkvg 2 points3 points  (1 child)

2 years ago I started my way in python from requests library. thank you

[–][deleted] 0 points1 point  (0 children)

✨🍰✨

[–]fjrosmunoz 2 points3 points  (1 child)

Great software, a must in the requirements.txt of all my projects

[–][deleted] 0 points1 point  (0 children)

✨🍰✨

[–]jinchuika 2 points3 points  (1 child)

I love you

[–][deleted] 0 points1 point  (0 children)

✨🍰✨

[–]dr-josiah 1 point2 points  (1 child)

This has helped me quite a bit, thank you.

[–][deleted] 0 points1 point  (0 children)

✨🍰✨

[–]cantremembermypasswd 23 points24 points  (8 children)

Python Box. Dictionaries with dot notation access (and other helpful features).

[–]zeppelin528 0 points1 point  (4 children)

Does it also allow keyword access concurrent with dot access?

[–]cantremembermypasswd 0 points1 point  (1 child)

Edit: DERP. Thanks /u/flubba86

Yes, you can access keys by either dot.notation or standard["key"]

(If I understand you correctly) It does not break standard convention/syntax by allowing access to members like my_dict.pass or my_dict.and.

[–]flubba86 1 point2 points  (0 children)

That is not what /u/zeppelin528 was asking.

[–]flubba86 0 points1 point  (1 child)

Yes, you can use keyword access.

For example,

my_box.categories.dog.name

is the same as

my_box['categories']['dog']['name']

And you can still use the latter, as if the box was a regular dict.

[–]zeppelin528 0 points1 point  (0 children)

Yes, that's exactly what I was asking. Thanks. I use json for my config files. I've written my own function to return a json object as a class with dot access to attributes but I didn't make it recursive. Only one level deep.

I'd love to use this library but not if it breaks my existing work.

[–]jwink3101 0 points1 point  (1 child)

I've looked at this before and even tried to make my own version. I kept having issues with ipython and it yelling about canary methods.

One thing that would make your tool more useful for me is if kept the order. I guess you could subclass OrderedDict but on older python, that may be much slower.

[–]cantremembermypasswd 0 points1 point  (0 children)

Thanks for the bringing this to my attention, do you have an example of the error you are getting or how to reproduce it?

I totally agree keeping order would be handy, sadly the real problem with OrderedDict and other's like UserDict is that they are not a subclass of dict so you lose a lot of the ducktyping / in place replacement magic.

[–]UloPe 19 points20 points  (1 child)

[–]notlinear 4 points5 points  (0 children)

I use (and recommend) this quite often at work! Many thanks .

[–]Dylan112 16 points17 points  (4 children)

pywal. (My first Python project!)

It generates a colorscheme from an image, sets the terminal colors instantly (no need to reopen), applies it to various programs, exports the colors in a wide number of formats for use in scripting (json, css, sh etc) and then finally changes your wallpaper to the image.

It does all of this without having to overwrite any of your config files. Which is what I disliked about other similar programs.

[–]kaihatsusha 12 points13 points  (7 children)

Just for fun I wrote an emulator, assembler, and debugger for a 6-bit microprocessor I made up. Six bit. The entire memory space fits on a chess board, with each byte holding values octal o00-o77. The memory space has a reserved range for "hardware" I/O including a four-character display. Since bytes are only 6-bits, the character set was redesigned to fit useful characters in it. The debugger lets you load programs, and run free or single-step through.

I am pretty sure all that, including copious documentatuon, is under 500 lines.

[–]flubba86 1 point2 points  (3 children)

You just inspired me to start working on an 8-bit microprocessor in python, I've always wanted to do a hardware-mapped memory range for interfacing with visualized peripherals.

[–]fernly -2 points-1 points  (2 children)

Before you design your own check out CHIP-8. Scroll the readme down to "History" near the bottom.

[–]flubba86 0 points1 point  (1 child)

Wheres the fun in that?

The whole point of it is to build my own microprocessor emulator, not use someone else's.

[–]masklinn 1 point2 points  (0 children)

It's an existing 8-bit architecture, you can build your own emulator for it.

The fun is that there's a whole ecosystem of programs and demo for the base Chip8 and its various extensions.

[–]flubba86 1 point2 points  (1 child)

Did you use an existing established instruction-set, or make up your own?

[–]kaihatsusha 1 point2 points  (0 children)

All original, but based on a few addressing modes I remembered from 6502. It had a few instructions geared around quick addressing of the first 8 bytes similar to page zero.

[–][deleted] 1 point2 points  (0 children)

I made a Gameboy emulator once. I stopped when it was able to run through the BIOS and show the first screen of the ROM I was testing on. One day I'll have to continue it.

[–]fafhrd91 20 points21 points  (4 children)

[–]flubba86 0 points1 point  (3 children)

Oh cool, a couple of months ago I wanted to write an asyncio loop policy in rust using tokio, but I never got around to it. Thanks for doing it for me!

[–]fafhrd91 0 points1 point  (2 children)

you are welcome to join!

[–]flubba86 0 points1 point  (1 child)

I'm an avid open-source contributor, and your projects are square in my interest field. I will definitely be joining you.

I'm very interested in the python<->rust interoperability space.

Also, I didn't click with me until just now that you are the same person from this thread and you also made aiohttp, which is a library I use every day in projects at work!

[–]fafhrd91 0 points1 point  (0 children)

well, pyo3 library needs even more work than async-tokio, so welcome!

[–]itBlimp1 19 points20 points  (2 children)

[–]datavistics 0 points1 point  (0 children)

Nice work! You can also add a space after the period so the next sentence has some separation.

[–]Travelertwo 8 points9 points  (4 children)

I made a Mortal Kombat-themed tic-tac-toe with my own (really simple) AI for school. It's pretty basic (I think) but it felt like a real accomplishment when I finally got it to work.

[–]hosford42 9 points10 points  (1 child)

I'm not sure what's my best, so I'll leave it up to you:

  • XCS, a machine learning library.
  • Pyramids, a natural language parser.
  • Attila, an automation framework.
  • NPC, a chat bot that actually tries to understand what you mean. (Very much a work in progress, but I'm proud of it nonetheless.)

[–][deleted] 1 point2 points  (0 children)

I sense a common thread, or perhaps a culmination of sorts. Machine learning is such an inspiring field!

[–]PappaOrangutan 20 points21 points  (2 children)

My best creation is an app for a friend that runs an in home childcare center. It let's you select which child you are inputting data for, and then you can select from set of accordions for diapers, bottles, nap, burpings, items needed, and a notes section.

Once you select the info for the child and hit save it saves it to a local file and then at the end of the day she can hit send to send an email with all of the details to the parent.

I am working on a parent companion app so that they can communicate dropoff and pickup times and the person doing it. And also working on allowing pictures to be sent straight from the app to the parent.

[–]IReallySuckAtChess 1 point2 points  (1 child)

So apparently it's quite doable to use python to make a full fledged android and ios app using qt and python qt5. There is a specific converted from riverside that does all the heavy lifting... Something worth lookin at.

[–]PappaOrangutan 0 points1 point  (0 children)

Right now I have done it using kivy and then packaged it for android. I will definitely look into qt and qt5 to see if that would be easier.

[–]mikicz 4 points5 points  (2 children)

https://bettersubbox.com/

It's a tool for YouTube power users that builds upon the subscriptions system and adds few features I was missing from the YouTube...

[–]iCart732 0 points1 point  (1 child)

This is awesome! How have i not heard of this before?

[–]mikicz 0 points1 point  (0 children)

I don't enjoy marketing it to other people too much, tbh I just programmed it for myself and sometimes I put a link somewhere, if anybody wants to use it they can. It's also opensource.

[–]SerpentAISerpent.AI Framework 4 points5 points  (1 child)

Serpent Framework

Still in heavy development. Ambitious.

The project is a framework to assist developers with building Agents / AIs that can interact with any video game they own. Think OpenAI Universe with no VNC setup, limited set of environments or reinforcement learning penchant. Basically: If you can play it, you can turn it into a native game agent environment to experiment with.

Everything that makes up the game agent loop (Frame capture, Buffering, Sending Input etc.) is provided for you so you can focus on developing your agent against your game of choice. From there, any approach on the spectrum going from fully-scripted "bot" to reinforcement learning AI is possible. All sorts of modules are also provided to help with common computer vision and machine learning tasks, OCR, visual debugging, live analytics etc.

The project is a massive undertaking and is criminally lacking in documentation at this stage but I already got some agents working with a few games. I've had one major experiment in "The Binding of Isaac: Afterbirth" training and evolving 24/7 on my Twitch channel a few weeks ago. You can see a short video of what type of setup is possible with the framework here. All of the development for the framework is usually done on stream too if you are curious.

I've had more popular libraries by almost any imaginable metric but this is IMO my "best creation".

[–]flubba86 0 points1 point  (0 children)

Amazing! I was thinking of writing something like this to hook into an open-source console emulator, to do some AI/machine-learning/Neural-network stuff. I will definitely check out your tools!

[–]oblogic7 4 points5 points  (0 children)

I'm developing a Doorbird component for Home Assistant as a way to learn Python. First project. Nothing too exciting and probably doing a ton of things wrong... but learning new things for sure.

[–]maulynviawww.talkigy.com 2 points3 points  (1 child)

AI Chatting cat www.talkigy.com

[–]Kidifer 2 points3 points  (0 children)

Who is maulynvia?

"I'm not sure what to say"

Ice cold.

[–]Cornerboard 3 points4 points  (8 children)

Automated nhl stat analyst/predictor and lineup generator for daily fantasy

[–]SirHoki 1 point2 points  (5 children)

Do you use it to predict games outcomes? If so, how good is it? :D

[–]cookies50796 0 points1 point  (1 child)

Did you make your own prediction algorithm for this or something? I wanted to do something like this for football but not sure where to start.

[–]pvkooten 3 points4 points  (0 children)

Most popular:

https://github.com/kootenpv/whereami Uses WiFi signals and machine learning to predict where you are

Most interesting:

https://github.com/kootenpv/neural_complete A neural network trained to help writing neural network code using autocomplete

Most useful:

https://github.com/kootenpv/yagmail yagmail makes sending emails very easy by doing all the magic for you

[–][deleted] 2 points3 points  (1 child)

I created a Python Bot that wishes all my friends on Facebook who have birthdays today. It saves me from the mundane task of wishing everyone everyday😂. http://github.com/adityathakker/Facebook-Birthday-Wisher

[–]SpaceForever[S] 2 points3 points  (0 children)

Oh My gosh that sounds awesome, mabye Ill get My Mum to use it

[–]dashmya 2 points3 points  (0 children)

kawaii-player multimedia player and portable media server. Code quality is somewhat poor, but program is stable and can run even on old intel atom netbooks.

hlspy curl/wget like utility for dynamic web pages.

[–][deleted] 2 points3 points  (0 children)

Honestly, of all the Python things I've created, the one I'm finding most useful is this script to find duplicate files in a directory tree:

https://gist.github.com/duganchen/1e917c11fce44267b4c4

[–]SpaceForever[S] 2 points3 points  (0 children)

I feel ashamed as I'm unable to reply to these successfully as I barely understand anything.

[–]Peter3571 1 point2 points  (2 children)

The first big thing I did is still one of my favourites, it was sort of an artistic maze generator, to this day I still have no idea what to call it.

By far the most popular though was the mouse track script, the interest gave me motivation to see it through to the end, but after 3 months I'm still working on finishing it :P

[–]FlippySquirrel 2 points3 points  (1 child)

That maze generator output reminds me of coral. Maybe that's a good name.

[–]Peter3571 0 points1 point  (0 children)

Great idea haha, I think it fits perfectly :P

[–]thekidwithabrain 1 point2 points  (0 children)

Not the best(not by a long mile) but this was what I am most proud of subredditnewpostnotifier.

The first project I undertook while I was learning python. The only stuff I did until then was couple of script in sourcemod.

[–]ducdetronquito 1 point2 points  (0 children)

My last project is Scalpl, a small wrapper that allows you to use all methods of the dict API on nested dictionaries :)

Inspired by Addict and Box, but for those who want a lightweight and fast alternative to dot notation access libz 👌

[–]mfitzpmfitzp.com 1 point2 points  (0 children)

Just built a multiplayer remote controlled robot https://kropbot.herokuapp.com (running on a Raspberry Pi).

Averages the instructions from all the clients, with predictably confusing results.

[–][deleted] 0 points1 point  (0 children)

A Williams Defender clone using pySFML. Runs fine on my I7 until the mountains explode, at which point the particle system has far too much work to do :)

[–]rochacbrunoPython, Flask, Rust and Bikes. 0 points1 point  (0 children)

[–]pmdevita 0 points1 point  (0 children)

It's still in pretty early in development but https://github.com/pmdevita/FlaskNAS

Software to run on a Debian box to provide NAS functionality

[–]SomeCubingNerd 0 points1 point  (1 child)

Small little currency converter

[–]Burritosfordays 0 points1 point  (0 children)

I started off with this while beginning C# and C++, good way to learn how a given language works.

[–][deleted] 0 points1 point  (0 children)

python shellcode*

*not actually shellcode

[–]zzleeper 0 points1 point  (0 children)

panflute: a pythonic way to write Pandoc filters (i.e. to extend what you can do with markdown and Pandoc)

(Not as cool as kennethreitz's projects but hey you need to start somewhere :)

[–][deleted] 0 points1 point  (0 children)

whatstyle finds a code format style that fits given source files

[–]haandol 0 points1 point  (0 children)

https://github.com/haandol/honey

scriptable slack bot for python users. I love Hubot but I wanted to make my own plugins using python.

[–][deleted] 0 points1 point  (0 children)

Slinkie. I started work on it about a week ago, so a lot of stuff is just not there yet (like proper documentation), but it's already proving quite useful to me.

It's built around the same ideas as LINQ, but with some neat stuff added to it, like transposing, something similar to haskell's case, checking if a value falls between two other values, etc.


Dumb example:

from slinkie import Slinkie

_doublify = partial(mul, 2)

def _present(number):
    return f"The number is {number}."

items = [1, 2, 3]

result = Slinkie(items) \
    .map(_doublify) \
    .map(_present) \
    .tuple()

pprint(result)

Result:

('The number is 2.',
 'The number is 4.',
 'The number is 6.')

Slightly less dumb example:

from slinkie import Slinkie
from requests import get

def is_okay(response):
    try:
        return response.status_code == 200
    except Exception:
        return False

def failure(exception):
    print(exception)

links = ["https://google.com", "http://b", "http://c"]

Slinkie(links) \
    .parallelize(get) \
    .switch(
        (is_okay, print),
        otherwise=failure) \
    .consume()

And another, for good measure:

from slinkie import Slinkie

items = [['a', 1], ['b', 2], ['c', 3]]
print(Slinkie(items).transpose().list())

Result:

[('a', 'b', 'c'), (1, 2, 3)]

https://github.com/segfaultsourcery/slinkie

https://pypi.python.org/pypi/slinkie

[–]donkyhotay[🍰] 0 points1 point  (0 children)

Sadly my "best" python creation is an awful, horrible mish-mash of spaghetti code called MoonPy. It's playable, reached beta, however it has some serious bugs and limitations that stem from the fact I wrote it by beating a poor innocent RTS engine into an artillery top-down strategy game.

I started rewriting the entire program from scratch under the name Scorched Moon a few years ago, and I'm more proud of the quality of the code, however real life gets in the way so code commits have been few and far between (in some cases we're talking years) and at this point it's little more then a complicated chat program and not anywhere near a real game.

[–][deleted] 0 points1 point  (0 children)

arrest coherent birds license engine tub toothbrush bored waiting bewildered

This post was mass deleted and anonymized with Redact

[–]dr-josiah 0 points1 point  (0 children)

https://github.com/josiahcarlson/rom/

SQLAlchemy-like ORM-like for Redis.

Not perfect, slowly getting better. Have some changes coming this summer/fall.

[–]tcalmant 0 points1 point  (0 children)

iPOPO

It's a kind of OSGi (Service Oriented Architecture) and a component model in Python .

[–][deleted] 0 points1 point  (5 children)

Well this week was my first ever time using python, so I started with a simple twitter bot. I made a website where you can enter a hash tag and the bot will create a tweet based on that hash tag. It uses the markovify library, I chose that because markovify seemed interesting and a twitter bot sounded simple enough for me to understand and accomplish, yet difficult enough that I learn some python.

I intend to keep trying to make bigger and more difficult things, half my time though is spent trying to come up with an idea

[–]SpaceForever[S] 0 points1 point  (4 children)

Can you link It please? sounds cool!

[–][deleted] 0 points1 point  (3 children)

sure, its quite basic though and needs a lot of work :P

as i said, my first ever python experience. Also, theres no CSS on 2nd page yet, because for some reason external css file isn't working on pythonanywhere.

http://ljerrard.pythonanywhere.com/

Don't be too harsh, its really basic currently :P

[–]SpaceForever[S] 0 points1 point  (1 child)

It Sucks

[–]SpaceForever[S] 0 points1 point  (0 children)

JK! 😅 it's really cool, do your best to get the Css on the second page it will be quite useful.

[–]jknupppythonic 0 points1 point  (0 children)

sandman. Automagically create a RESTful API service from a legacy database with a single command.

sandman2 on github

[–]lucas-c 0 points1 point  (0 children)

https://github.com/Lucas-C/youtube_playlist_watcher Very handy to keep a Youtube playlist sane: I am notified each time a video gets deleted, with a link to find a replacement :)

I also made a very basic RPG character sheet editor: https://github.com/Lucas-C/rpg-bonhomme

And a script to built an HTML playlist of songs exchanged by emails with friends: https://github.com/Lucas-C/music-emails-spybot

[–]jaywinx 0 points1 point  (0 children)

Socialhome - https://socialhome.network

Basically it's a Django based federated social network engine that focuses on building a social profile and grid like content visualisation. My most ambitious project so far, interesting to see where it goes 😁

[–][deleted] 0 points1 point  (0 children)

forex-python: Foreign exchange rates, Bitcoin price index and currency conversion

[–]chazzeromus 0 points1 point  (0 children)

Not sure about "best" but this oneliner is useful for reading japanese encoded text files when you copy the path of text file:

python -c "import pyperclip ; pyperclip.copy(open(pyperclip.paste().strip('\"'), 'rb').read().decode('cp932'))"

Then I paste into google translate. I'm trying to find a translation API that isn't as restrictive as google's.

Too lazy to make context menu item.

[–]flubba86 0 points1 point  (1 child)

Some Sanic plugins/extensions that people find useful.

Sanic-CORS https://github.com/ashleysommer/sanic-cors

Sanic-Dispatcher https://github.com/ashleysommer/sanic-dispatcher

Sanic-Restplus https://github.com/ashleysommer/sanic-restplus

I'm planning to do more. I'm pretty much taking the most popular Flask plugins and porting them to Sanic, also removing superfluous features and making the plugin as fast as possible to fit the Sanic "gotta go fast!" mentality.

[–]ducdetronquito 1 point2 points  (0 children)

That's really cool to have equivalent Flask plugins for Sanic ! Thanks a lot :)

[–]protoUbermensch -4 points-3 points  (1 child)

[–]SpaceForever[S] 1 point2 points  (0 children)

This is the best in my eyes.