| Nytcampfin. ´º¿å ŸÀÓÁÀ§ÇÑ Python Ŭ¶óÀ̾ðÆ® Ä·ÆäÀÎ ±ÝÀ¶ API |
Áö±Ý ´Ù¿î·Îµå |
Nytcampfin. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Derek Willis
Nytcampfin. ű×
Nytcampfin. ¼³¸í
NytcampfinÀº ´º¿å ŸÀÓÁî Ä·ÆäÀÎ ±ÝÀ¶ API¸¦À§ÇÑ ¸Å¿ì ±âº»ÀûÀÎ ÆÄÀ̽ã Ŭ¶óÀ̾ðÆ®ÀÔ´Ï´Ù. Å×½ºÆ®¸¦ ½ÇÇàÇϱâ À§ÇØ È¯°æ º¯¼ö·Î ¼³Á¤ ÇؾßÇÏ´Â API Å°°¡ ÇÊ¿äÇÕ´Ï´Ù. installRequirementsNytcampfinÀÌ API ¿£µå Æ÷ÀÎÆ® ¹× ÀÔ¼öÇϽʽÿÀ (https://github.com/kennethreitz/requests)¿¡¼ ¸¦ »ç¿ëÇÏ¿©ÀÖ´Â setup.py Ŭ¶óÀ̾ðÆ® ¹Ýȯ JSON ¸¸ÀÌ ¾Æ´Ñ Àüü ÆÄÀ̽ã objects.Install ÇÌ nytcampfinOr ´Ù¿î·Îµå ¹× ½ÇÇà ÆÄÀ̽ãÀ» ¼³Ä¡ (https://github.com/reclosedev/requests-cache). ij½Ã´Â ·ÎÄà SQLite µ¥ÀÌÅͺ£À̽º¸¦ »ç¿ëÇÏ°í 5 ºÐ ÈÄ¿¡ ¸¸·áÇϵµ·Ï ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù. Å×½ºÆ®¸¦ ½ÇÇàÇÏ·Á¸é ´ÙÀ½À» ¼öÇàÇϽʽÿÀ. Python Test.pyThe ij½Ì »ç¿ëÀº tests.usage >>>¿¡¼ nytcampfin °¡Á® ¿À±â >>¿¡¼ > ±ÝÀ¶ = NYTCAMPFIN (your_nyt_campaign_finance_api_key) # ¿À´ÃÀÇ ¼·ù¸¦ °Ë»ö >>> ¿À´Ã = finance.filings.today () >>> ¿À´Ã 793150 #À§¿øȸÀÇ ¼¼ºÎ Á¤º¸ °Ë»ö >>> cmte = finance.committees. GET ( 'C00490219', 2012) >>> cmte U'C00490219'ProductÀÇ È¨ÆäÀÌÁö
Nytcampfin. °ü·Ã ¼ÒÇÁÆ®¿þ¾î