We are currently on vacation until 21st July 2025, ticket responses maybe be longer than normal during this period, sorry for any inconvenience.

Automate Import via python

Closed

Import WP Pro Updated 9 months ago 3 Replies

Federico asked 9 months ago on October 26, 2024 at 2:50 pm

Does WP Import has an API where I can upload my CSV against an importer and automate that via Python code. I use Python with application password authetication against user to upload images to my media library.

Can I upload my csv files against importers using API?

If yes, any documentation available?

thank you,

 

Fede.

J

James replied Support Agent

9 months ago on October 26, 2024 at 6:46 pm

Hi Fede,

There is no api to run the importer, however the best thing i can think of is having your python code upload its csv files into a folder on the wordpress web server, where the importer can then be scheduled to run every 5 minutes and import files from that folder?

James

FL

Federico replied

9 months ago on October 27, 2024 at 10:05 am

Hello,

That is an interesting option, I noticed the Run Import --> Schedule - Run Import at later date.

Will explore that option, thanks, Fede.

J

James replied Support Agent

9 months ago on October 27, 2024 at 10:56 am

Hi Fedrico,

The run in background mode works by using the wordpress cron or custom importwp cron (https://www.importwp.com/docs/how-to-schedule-an-importer/#configuring-the-cron-task-scheduler) and requires that you have this being triggered frequently e.g. every minute, as the more frequent it is ran the quicker background imports will work.

James