1
0
Fork 0

Import url/password via settings.py file. XXX

main
Jeff Moe 2023-04-24 11:20:21 -06:00
parent 5d5dee0503
commit 9e79dd0ef3
3 changed files with 14 additions and 1 deletions

View File

@ -32,9 +32,12 @@ pip install -r requirements.txt
# Configure
Configure thusly.
Set URL for API and API password (token).
```
vim ~/.config/mastodon-api
cp cp src/settings.py-dist src/settings.py
$EDITOR src/settings.py
```

View File

@ -17,3 +17,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from mastodon import Mastodon
from settings import password, url
mastodon = Mastodon(
access_token=password,
api_base_url=url
)

View File

@ -0,0 +1,2 @@
url='https://127.0.0.1'
password='password'