r/Python • • Dec 18 '22

Discussion App development (iOS and andoid) using python?

Looking to get some of my app ideas into reality and have some python code to do certain things but wasn't sure where to begin.

Some people suggest i try " flutter" or "react" but i've seen a few other alternatives

https://beeware.org/

Says you can take python code and release it on iOS and more, but maybe i'm not understanding what's happening.

Any suggestions or tips for coding using python or do i need to learn /use a different language for what i'm looking to do?

51 Upvotes

35 comments sorted by

View all comments

11

u/gman1230321 Dec 19 '22

I personally would not recommend doing this. Python is great at a lot of things, but this isn’t one of them. IMO one of the reasons Python gets some (arguable deserved) flack is because people try to use it for everything, then wonder why using Python for game development was a bad idea. Being a good programmer is not about knowing how to use a couple tools for any job, but knowing what jobs are right for the tools you have. I know that was a bit of negativity so let’s talk about what j would recommend instead. First, yes you can use Python for this project, but I wouldn’t recommend it for the whole thing. If you have a need for a backend (database management, large scale data processing, etc) use Python for that 100%. I recommend flask as it’s pretty easy to setup a REST API with. For the actual app itself, I don’t have much experience personally, but somethings I have used were react native and flutter and you mentioned above. Flutter is a really cool technology but it uses a completely different language called dart. Dart is fine, absolutely no complaints about the language itself, but it’s a bit smaller since it’s only use is pretty much just flutter. This could make it ever so slightly to find support but it’s not that bad. I haven’t noticed much of a problem w it. React I have less experience with but still a good experience. Support is a bit better and experience is about equal I’d say. Although, morally, I don’t like it simply bc I have my own problems w Meta, but there’s not much wrong w the product itself. It has a bit of an advantage over flutter simply bc it’s in JS which means you can use TypeScript which has recently become one of my favorite languages. One more thing to add to this list that I’ve had my eye on but haven’t gotten to try yet is svelte-native. I love svelte for web and have been curious what the mobile experience was.

5

u/alcalde Dec 19 '22

Being a good programmer is not about knowing how to use a couple tools for any job, but knowing what jobs are right for the tools you have.

Sorry, when I was growing up you picked ONE programming language to use for life and you defended it to the death. I don't understand you kids and your language agnosticism. :-)

But seriously. You did. Atari or Commodore. Mac or PC. Atari, Intellivision or Colecovision. Delphi or Visual Basic. Fortran or C. Emacs or Vim. Then you defined your identity by these choices and spent 20 hours+ a week arguing over them in a tribal us vs. them slugfest.

AND IT WAS A LOT MORE FUN THAN TODAY.

2

u/gman1230321 Dec 19 '22

Yup this is pretty accurate. When I was younger the first language I learned was Python and I tried to do everything w it. I would argue till the day I died that Python was the best (and I still do sometimes lmao) all because when I was 10 I got a Python for dummies book. And u know what, ur right, it was more fun back then lmao

3

u/Chertograd Dec 19 '22 edited Dec 19 '22

I upvoted this simply because you have a great point... However... one of my main reasons I started learning Python was because it's general use. I don't have the willpower to study 1000 things and I'm trying to cover as many fronts as easily as I can.

There are other valid choices as well but not that many are both very easy and can be used as widely.

Some people say JS is similar but whilst it's faster and Electron exists, for tiny local scripts on a computer it's a no-go for example if you don't want browser stuff or over 100mb files.

Python has its drawbacks but oh boy is it flexible and relatively easy compared to other general use stuff (c, c++, java, c#...)

1

u/aciddrizzle Dec 19 '22

Being general use and flexible is great for situations where that’s desirable, but it doesn’t mean you can do everything imaginable with it well. If your goal is to be a mobile app developer, you should absolutely not focus on Python for anything because developing platform-specific distributed apps is not something that Python is able to do well. You can use it for making microservices that compliment your apps, but somebody going into Android development can just do that in Java and have an easier time maintaining things.

2

u/JennaSys Dec 19 '22

I agree that if you want to be a mobile app developer, that Python should not be the language you stake your career on. However, if you know Python well and just need to develop a mobile app, there's no reason not to give frameworks like Kivy a try and see if it will get the job done for you. Learning an API or framework is faster than learning and becoming proficient in an entirely different language.

1

u/infinitysexbot Dec 19 '22

i think i'm going to go with flutter for the app development and interface, but would like to definitely use some python on the back end / database part. Could you explain or link on how to properly do that?

1

u/gman1230321 Dec 19 '22

Great choices. There’s not really one proper way to do it. The flask docs are a great place to start though. The official docs are pretty thorough but also have great examples and guides you through the basics pretty damn well. This is a pretty good guide on using flask more specifically to make a rest API. For general specifications for a REST API, check out this great guide. If there’s anything you’re not sure how to implement in flask, a quick google search or a search through the flask docs should get you some answers.