Upload from my website to my cdn using Python [closed] - python

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
On my website, I have an upload directory, with an upload.html page. I want to be able to send the upload to an external CDN, which is an AWS bucket. According to this post, it can't be done using PHP, however I was wondering if I could do this using Python. I don't have any code, because I have no idea where to start. Maybe I can interact with the AWS CLI using Python?
Thanks for any help.

You can do it with AWS PHP SDK as well you just sync the uploaded files to S3 Bucket
$client = S3Client:::factory(array(
'key' => 'your-aws-access-key-id',
'secret' => 'your-aws-secret-access-key'
));
$client->uploadDirectory('/local/directory', 'my_bucket');
https://www.codementor.io/#limormaayan/data-sync-to-aws-s3-overview-and-best-practices-eptvrh6ju
https://docs.aws.amazon.com/aws-sdk-php/v2/api/namespace-Aws.S3.Sync.html

Related

How to serve a Flutter web app using Django? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
After building a flutter web app with
flutter build web
I want to deploy this with dango server, what should i do?
I'm assuming that your backend is an API Rest and does not render the HTML.
The "right" way will be to have a service for the SPA, and another for the API. For example, with docker, droplets, kubernetes, DO and Heroku.
Another way that I'm thinking is... you specified a route (like example.com/) to serve the flutter web project (I mean the HTML), and the other routes can be the endpoints.

Submit python script through PHP/AJAX [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I made a python script which can convert .MOV to .MP4. I want to execute the script from my website made on PHP.
So the example is I'm browsing a video on the web page then I click on submit and I'm waiting for the python script executing. It's working already but now I need to adapt it to my actual website and the session cookie (PHP).
But I don't know how to do that. I saw on some forum that they use Flask or Django but my website is already built and I don't want to rebuilt it.

it is possible to use python code to create automatically a gmail account? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to develop a program that can create automatically a gmail account with the use of python.
Is it possible?
If you're looking for a disposable email address, look for such a service with a public API (eg. temp mail). Then use http.client or Python Requests to interact with that API.
If your goal is to create spam or ghost accounts - don't. These services are aimed at quality assurance, ie. testing email services.

Find all files in a directory on another server in python [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'd like to be able to list all files found in a directory tree on a server that requires authorization for access. If I were trying to list files within a local directory tree, I would use the os.walk functionality (quite simple, I like that); however, when I'm trying to search a secure server, I'm lost. I know the credentials to log onto that server, but I'm not sure of the steps needed to log in and retrieve the information above (I'm new to python). Can anyone provide examples? Thanks.

programmatically update facebook status [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Is there a Python program where you can post a status update without going to the website itself?
Where or how do i get started?
You would wanna get started here, https://github.com/facebook/python-sdk
unless there's a library I don't know about.
You can checkout my fork of the python sdk. It's customized to work better with django.
You can check here on how to use it to authenticate a user.
After that you can use the python sdk to post a news entry.
fb.put_wall_post("hello")
Or do it yourself, it's only a matter of doing a POST request to http://graph.facebook.com/FBID/feed where FBID is the ID of the page or profile you want to publish to, more info in the facebook doc.

Categories

Resources