title: Uploading an Entire JSON file to Firebase
body: <p>I am trying to &quot;push&quot; the entirety of a JSON file to Firebase, however upon executing the script, I am presented with a Response [405] and no values end up being uploaded to Firebase.</p>
  <p>In essence, I am trying to dump all the information inside a JSON file directly to my Firebase test database... here is my current code and JSON file:</p>
  <br>
  <br>
  <pre><code>from firebase import firebase
  import requests
  import json
  from pprint import pprint
  
  with open ('/var/www/mywebsite.com/html/private/scripts/data.json') as data_file:
      data=json.load(data_file)
      jsondata = json.dumps('/var/www/mywebsite.com/html/private/scripts/data.json')
  pprint(data)
  
  firebase=firebase.FirebaseApplication(&quot;https://myapp.firebaseio.com&quot;)
  
  r2 = requests.put(&quot;https://myapp.firebaseio.com&quot;,data=jsondata)
  print(r2)
  </code></pre>
  <p>JSON file (data.json):</p>
  <pre><code>{
      &quot;_type&quot;: &quot;News&quot;,
      &quot;queryContext&quot;: {
          &quot;originalQuery&quot;: &quot;politics&quot;
      },
      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/news/search?q=politics&quot;,
      &quot;totalEstimatedMatches&quot;: 30800,
      &quot;value&quot;: [
          {
              &quot;about&quot;: [
                  {
                      &quot;name&quot;: &quot;Donald Trump&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/1a466af2-ed23-25bd-794d-1ca925e4681b&quot;
                  }
              ],
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-05T22:25:00.0000000Z&quot;,
              &quot;description&quot;: &quot;President Donald Trump tweeted a fiery rejection of special council Robert Mueller testifying before Congress on Sunday, backtracking previous statements on the matter and going against the ...&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.D548DEF199C3CFAFC9E1636ED4EDF797&amp;pid=News&quot;,
                      &quot;height&quot;: 466,
                      &quot;width&quot;: 700
                  }
              },
              &quot;name&quot;: &quot;President Trump Attacks Mueller Testifying to Congress, in a Reversal of Previous Comments&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;image&quot;: {
                          &quot;thumbnail&quot;: {
                              &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=AR_53b75d2fe5b1d0f12d7437384fe429c0&amp;pid=news&quot;
                          }
                      },
                      &quot;name&quot;: &quot;Time&quot;
                  }
              ],
              &quot;url&quot;: &quot;http://time.com/5583464/trump-mueller-testify-congress-republicans/&quot;
          },
          {
              &quot;about&quot;: [
                  {
                      &quot;name&quot;: &quot;Donald Trump&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/1a466af2-ed23-25bd-794d-1ca925e4681b&quot;
                  },
                  {
                      &quot;name&quot;: &quot;China&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/5fcc3d97-0cf2-94e5-6dad-cd70e387bd69&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Reuters&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/9f417f89-9a37-e0d0-912e-99dccfb8982d&quot;
                  }
              ],
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-05T23:28:00.0000000Z&quot;,
              &quot;description&quot;: &quot;WASHINGTON (Reuters) - President Donald Trump dramatically increased pressure on China to reach a trade deal by announcing on Sunday he would hike U.S. tariffs on $200 billion worth of Chinese goods this week and target hundreds of billions more soon.&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.282E46AFB3D802530215CF503A4968E0&amp;pid=News&quot;,
                      &quot;height&quot;: 466,
                      &quot;width&quot;: 700
                  }
              },
              &quot;mentions&quot;: [
                  {
                      &quot;name&quot;: &quot;Donald Trump&quot;
                  },
                  {
                      &quot;name&quot;: &quot;China&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Reuters&quot;
                  }
              ],
              &quot;name&quot;: &quot;Trump vows new tariff hike on Chinese goods, escalating tension in trade talks&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;image&quot;: {
                          &quot;thumbnail&quot;: {
                              &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=AR_62e71bb461e92ae25d37bed673fc53b9&amp;pid=news&quot;
                          }
                      },
                      &quot;name&quot;: &quot;Reuters&quot;
                  }
              ],
              &quot;url&quot;: &quot;https://www.reuters.com/article/us-usa-trade-china/trump-vows-new-tariff-hike-on-chinese-goods-escalating-tension-in-trade-talks-idUSKCN1SB0KP?feedType=RSS&amp;feedName=topNews&quot;
          },
          {
              &quot;about&quot;: [
                  {
                      &quot;name&quot;: &quot;Joe Biden&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/cad484f9-be75-7a78-12dd-16233f823cd7&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Bernie Sanders&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/d1b180da-aff9-59f7-887e-85784c68fe0c&quot;
                  }
              ],
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-05T22:42:00.0000000Z&quot;,
              &quot;description&quot;: &quot;Former Vice President Joe Biden Joseph (Joe) Robinette Biden Ben &amp; Jerry's co-founder introduces Sanders as a president who 'stands for justice in all its flavors' How the Democrats might avoid ...&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.CB91D4F2DB6E19E5A9A0E6F2E9885FA5&amp;pid=News&quot;,
                      &quot;height&quot;: 360,
                      &quot;width&quot;: 640
                  }
              },
              &quot;mentions&quot;: [
                  {
                      &quot;name&quot;: &quot;Joe Biden&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Bernie Sanders&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Dark skin&quot;
                  }
              ],
              &quot;name&quot;: &quot;Sanders faces big problem with Biden and black voters&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;image&quot;: {
                          &quot;thumbnail&quot;: {
                              &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=AR_fbfe507a57f598418fd179b0dec78111&amp;pid=news&quot;
                          }
                      },
                      &quot;name&quot;: &quot;The Hill&quot;
                  }
              ],
              &quot;url&quot;: &quot;https://thehill.com/homenews/campaign/442146-sanders-faces-big-problem-with-biden-and-black-voters&quot;
          },
          {
              &quot;about&quot;: [
                  {
                      &quot;name&quot;: &quot;Barack Obama&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/3af18923-3590-e53b-fdcd-4d1796a9a4cb&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Donald Trump&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/1a466af2-ed23-25bd-794d-1ca925e4681b&quot;
                  },
                  {
                      &quot;name&quot;: &quot;U.S. Immigration and Customs Enforcement&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/26bea532-e9e5-e53c-b037-ba7ac831cb90&quot;
                  }
              ],
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-05T20:56:00.0000000Z&quot;,
              &quot;description&quot;: &quot;President Trump tapped former Border Patrol chief under former President Barack Obama to run the U.S. Immigration and Customs Enforcement (ICE) agency a month after he withdrew his previous nominee to go \u201cin a tougher direction.\u201d \u201cI am pleased to ...&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.9D74B8CE1B8EE359001429857B7FF649&amp;pid=News&quot;,
                      &quot;height&quot;: 466,
                      &quot;width&quot;: 700
                  }
              },
              &quot;name&quot;: &quot;Trump picks Obama-era Border Patrol head to lead ICE after several recent Fox appearances&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;image&quot;: {
                          &quot;thumbnail&quot;: {
                              &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=AR_e1eef5681737e5676d7a09990b13411a&amp;pid=news&quot;
                          }
                      },
                      &quot;name&quot;: &quot;YAHOO!&quot;
                  }
              ],
              &quot;url&quot;: &quot;https://www.yahoo.com/entertainment/trump-picks-obamaera-border-patrol-head-to-lead-ice-after-several-recent-fox-appearances-205342554.html&quot;
          },
          {
              &quot;about&quot;: [
                  {
                      &quot;name&quot;: &quot;Joe Biden&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/cad484f9-be75-7a78-12dd-16233f823cd7&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Donald Trump&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/1a466af2-ed23-25bd-794d-1ca925e4681b&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Jim Crow laws&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/f6bd5d26-f89f-9ea0-05af-ad055a804427&quot;
                  }
              ],
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-06T00:45:00.0000000Z&quot;,
              &quot;description&quot;: &quot;COLUMBIA, S.C. (AP) \u2014 Former Vice President Joe Biden charged Saturday that Jim Crow is \u201csneaking back in\u201d as he emphasized voting rights at his first presidential campaign stop in South Carolina, where black voters play a key role in the South\u2019s ...&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.23F5987DE69FAFBE74A5F9DD6842D054&amp;pid=News&quot;,
                      &quot;height&quot;: 466,
                      &quot;width&quot;: 700
                  }
              },
              &quot;name&quot;: &quot;Biden: Trump, Republicans allowing Jim Crow to return&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;image&quot;: {
                          &quot;thumbnail&quot;: {
                              &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=AR_ea6cb82ab2fec30d4d14c92dad031a5a&amp;pid=news&quot;
                          }
                      },
                      &quot;name&quot;: &quot;The Seattle Times&quot;
                  }
              ],
              &quot;url&quot;: &quot;https://www.seattletimes.com/nation-world/nation/while-others-stump-in-iowa-biden-turns-attention-to-sc/&quot;
          },
          {
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-06T01:04:00.0000000Z&quot;,
              &quot;description&quot;: &quot;WASHINGTON -- Why aren't Democratic presidential candidates talking more about foreign policy? Are they being shrewd in playing down a divisive concern that is not at the front of voters' minds, or are they missing an opportunity? The right answer is: Both.&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.80BFDEBF99FE3F3ECA2A956A9CF3BFD1&amp;pid=News&quot;,
                      &quot;height&quot;: 467,
                      &quot;width&quot;: 700
                  }
              },
              &quot;name&quot;: &quot;Bringing Foreign Policy Home&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;name&quot;: &quot;RealClearPolitics&quot;
                  }
              ],
              &quot;url&quot;: &quot;https://www.realclearpolitics.com/articles/2019/05/06/bringing_foreign_policy_home_140242.html&quot;
          },
          {
              &quot;about&quot;: [
                  {
                      &quot;name&quot;: &quot;Joe Biden&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/cad484f9-be75-7a78-12dd-16233f823cd7&quot;
                  },
                  {
                      &quot;name&quot;: &quot;The Young Turks&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/6453d254-a1e3-148b-a351-d1a21b9227c9&quot;
                  },
                  {
                      &quot;name&quot;: &quot;The Lead with Jake Tapper&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/8a1206e9-495c-418d-93b9-d1bba50b4b75&quot;
                  }
              ],
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-05T23:36:00.0000000Z&quot;,
              &quot;description&quot;: &quot;Cenk Uygur, John Iadarola, and Maytha Alhassen, hosts of \&quot;The Young Turks,\&quot; discuss a CNN poll conducted by research organization SSRS that showed Joe Biden with a resounding lead against Sen. Bernie Sanders in the Democratic presidential primary.&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.CDC923190BF0F206D8541BBF4B1BD870&amp;pid=News&quot;,
                      &quot;height&quot;: 375,
                      &quot;width&quot;: 500
                  }
              },
              &quot;name&quot;: &quot;TYT's John Iadarola: CNN Poll Showing Biden In The Lead Sampled Statistically Insignificant Number Of Voters Under 50&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;name&quot;: &quot;RealClearPolitics&quot;
                  }
              ],
              &quot;url&quot;: &quot;https://www.realclearpolitics.com/video/2019/05/05/tyts_john_iadarola_cnn_poll_showing_biden_in_the_lead_sample_statistically_insignificant_number_of_voters_under_50.html&quot;
          },
          {
              &quot;about&quot;: [
                  {
                      &quot;name&quot;: &quot;Robert Mueller&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/63db3609-63fd-6756-fe02-fa71dab53ae4&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Malta&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/00727e9c-b7f7-2e31-0220-f5b9e956de8d&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Devin Nunes&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/293daa86-e689-8fdb-be85-caee83c910f9&quot;
                  }
              ],
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-05T23:30:00.0000000Z&quot;,
              &quot;description&quot;: &quot;House Intelligence Committee ranking member Devin Nunes, in a Fox News interview Sunday, blasted \u201ccherry-picked\u201d findings in Special Counsel Robert Mueller\u2019s report about Joseph Mifsud -- the mysterious professor from Malta who helped ignite the ...&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.0C0514FB13A987B0C168F5272A569E88&amp;pid=News&quot;,
                      &quot;height&quot;: 331,
                      &quot;width&quot;: 589
                  }
              },
              &quot;name&quot;: &quot;Nunes: Mueller report 'cherry-picked' information about mysterious Maltese Professor Mifsud&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;image&quot;: {
                          &quot;thumbnail&quot;: {
                              &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=AR_7dc0f55e947bdbc51189eb1a022e9eb6&amp;pid=news&quot;
                          }
                      },
                      &quot;name&quot;: &quot;Fox News&quot;
                  }
              ],
              &quot;url&quot;: &quot;https://www.foxnews.com/politics/nunes-mueller-report-mifsud-cherry-picked-information&quot;
          },
          {
              &quot;about&quot;: [
                  {
                      &quot;name&quot;: &quot;Jimmy Carter&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/07919d8e-1871-c8b1-0532-f3c1c0c0d3b2&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Peter Buttigieg&quot;,
                      &quot;readLink&quot;: &quot;https://api.cognitive.microsoft.com/api/v7/entities/4b0f74fe-6fd5-795d-dd93-58df9a9969ff&quot;
                  }
              ],
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-05T23:58:00.0000000Z&quot;,
              &quot;description&quot;: &quot;Mayor Pete Buttigieg and his husband, Chasten, visited Jimmy Carter's Sunday school class in Plains, Georgia, on Sunday, and then had lunch with the former president. The South Bend mayor said he was \&quot;humbled\&quot; to meet with Carter, who has also hosted other ...&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.855CDEC005F48CBB9A73CB73C027E7AE&amp;pid=News&quot;,
                      &quot;height&quot;: 350,
                      &quot;width&quot;: 700
                  }
              },
              &quot;mentions&quot;: [
                  {
                      &quot;name&quot;: &quot;Jimmy Carter&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Peter Buttigieg&quot;
                  },
                  {
                      &quot;name&quot;: &quot;Business Insider&quot;
                  }
              ],
              &quot;name&quot;: &quot;Pete Buttigieg went to Jimmy Carter's Sunday school class and the former president invited him to read from the Bible&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;image&quot;: {
                          &quot;thumbnail&quot;: {
                              &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=AR_86ac6d5fd1859e509650fb5feef96bf7&amp;pid=news&quot;
                          }
                      },
                      &quot;name&quot;: &quot;Business Insider&quot;
                  }
              ],
              &quot;url&quot;: &quot;https://www.businessinsider.com/pete-buttigieg-husband-chasten-attend-jimmy-carters-sunday-school-2019-5&quot;
          },
          {
              &quot;category&quot;: &quot;Politics&quot;,
              &quot;datePublished&quot;: &quot;2019-05-06T00:22:00.0000000Z&quot;,
              &quot;description&quot;: &quot;ST.PAUL, Minn. (AP) \u2014 There's a new mix at Minnesota's big conference table for the always-contentious negotiations at the end of the legislative session over the big questions of taxes and spending, which got going late last week. It's the first budget ...&quot;,
              &quot;image&quot;: {
                  &quot;thumbnail&quot;: {
                      &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=ON.ABE50EE80E8B9F4884B37663471649A7&amp;pid=News&quot;,
                      &quot;height&quot;: 517,
                      &quot;width&quot;: 700
                  }
              },
              &quot;name&quot;: &quot;2019 brings a new mix to Minnesota's big conference table&quot;,
              &quot;provider&quot;: [
                  {
                      &quot;_type&quot;: &quot;Organization&quot;,
                      &quot;image&quot;: {
                          &quot;thumbnail&quot;: {
                              &quot;contentUrl&quot;: &quot;https://www.bing.com/th?id=AR_54d6e8857a180186fb2098ccfbefbf4b&amp;pid=news&quot;
                          }
                      },
                      &quot;name&quot;: &quot;sfgate.com&quot;
                  }
              ],
              &quot;url&quot;: &quot;https://www.sfgate.com/news/article/2019-brings-a-new-mix-to-Minnesota-s-big-13820647.php&quot;
          }
      ]
  }
  </code></pre>