100% found this document useful (3 votes)
64 views

Download full Web Application Development with Streamlit: Develop and Deploy Secure and Scalable Web Applications to the Cloud Using a Pure Python Framework 1st Edition Mohammad Khorasani ebook all chapters

Applications

Uploaded by

sissykamonyl
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
64 views

Download full Web Application Development with Streamlit: Develop and Deploy Secure and Scalable Web Applications to the Cloud Using a Pure Python Framework 1st Edition Mohammad Khorasani ebook all chapters

Applications

Uploaded by

sissykamonyl
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Get ebook downloads in full at ebookmeta.

com

Web Application Development with Streamlit:


Develop and Deploy Secure and Scalable Web
Applications to the Cloud Using a Pure Python
Framework 1st Edition Mohammad Khorasani
https://ebookmeta.com/product/web-application-development-
with-streamlit-develop-and-deploy-secure-and-scalable-web-
applications-to-the-cloud-using-a-pure-python-framework-1st-
edition-mohammad-khorasani/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Secure Web Application Development: A Hands-On Guide with


Python and Django 1st Edition Matthew Baker

https://ebookmeta.com/product/secure-web-application-development-a-
hands-on-guide-with-python-and-django-1st-edition-matthew-baker/

ebookmeta.com

Web App Development and Real-Time Web Analytics with


Python: Develop and Integrate Machine Learning Algorithms
into Web Apps Nokeri
https://ebookmeta.com/product/web-app-development-and-real-time-web-
analytics-with-python-develop-and-integrate-machine-learning-
algorithms-into-web-apps-nokeri/
ebookmeta.com

Beginner's Guide to Streamlit with Python: Build Web-Based


Data and Machine Learning Applications 1st Edition Sujay
Raghavendra
https://ebookmeta.com/product/beginners-guide-to-streamlit-with-
python-build-web-based-data-and-machine-learning-applications-1st-
edition-sujay-raghavendra/
ebookmeta.com

The American War in Afghanistan: A History 1st Edition


Malkasian

https://ebookmeta.com/product/the-american-war-in-afghanistan-a-
history-1st-edition-malkasian/

ebookmeta.com
Directed Evolution Methods and Protocols Methods in
Molecular Biology 2461 Andrew Currin (Editor)

https://ebookmeta.com/product/directed-evolution-methods-and-
protocols-methods-in-molecular-biology-2461-andrew-currin-editor/

ebookmeta.com

Managing Innovation: Integrating Technological, Market and


Organizational Change 6th Edition Joe Tidd

https://ebookmeta.com/product/managing-innovation-integrating-
technological-market-and-organizational-change-6th-edition-joe-tidd/

ebookmeta.com

Reassured Love Club Curve Club Curves Series 1st Edition


Jade Royal

https://ebookmeta.com/product/reassured-love-club-curve-club-curves-
series-1st-edition-jade-royal-2/

ebookmeta.com

Practical Leadership in Community Colleges : Navigating


Today's Challenges 1st Edition George R. Boggs

https://ebookmeta.com/product/practical-leadership-in-community-
colleges-navigating-todays-challenges-1st-edition-george-r-boggs/

ebookmeta.com

InHabit People Places and Possessions Cultural


Interactions Studies in the Relationship between the Arts
Antony Buxton (Editor)
https://ebookmeta.com/product/inhabit-people-places-and-possessions-
cultural-interactions-studies-in-the-relationship-between-the-arts-
antony-buxton-editor/
ebookmeta.com
An Unexpected Love A Variation of Jane Austen s Pride and
Prejudice Lily Bernard

https://ebookmeta.com/product/an-unexpected-love-a-variation-of-jane-
austen-s-pride-and-prejudice-lily-bernard/

ebookmeta.com
Web Application
Development with
Streamlit
Develop and Deploy Secure
and Scalable Web Applications
to the Cloud Using a Pure
Python Framework

Mohammad Khorasani
Mohamed Abdou
Javier Hernández Fernández
Web Application Development with Streamlit: Develop and Deploy Secure
and Scalable Web Applications to the Cloud Using a Pure Python Framework

Mohammad Khorasani Mohamed Abdou


Doha, Qatar Cambridge, United Kingdom

Javier Hernández Fernández


Doha, Qatar

ISBN-13 (pbk): 978-1-4842-8110-9 ISBN-13 (electronic): 978-1-4842-8111-6


https://doi.org/10.1007/978-1-4842-8111-6

Copyright © 2022 by Mohammad Khorasani, Mohamed Abdou,


Javier Hernández Fernández
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: James Robinson-Prior
Development Editor: James Markham
Coordinating Editor: Jessica Vakili
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233
Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail
[email protected], or visit www.springeronline.com. Apress Media, LLC is a
California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc
(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected]; for
reprint, paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is
available to readers on the Github repository: https://github.com/Apress/Web-­Application-
Development-­with-­Streamlit. For more detailed information, please visit http://www.apress.com/
source-­code.
Printed on acid-free paper
To my parents Yeganeh and Daryoush and to
my departed grandparents Ghamar and Reza.
—Mohammad Khorasani
To my family, friends, and the open source community.
—Mohamed Abdou
To my family and friends for their support.
—Javier Hernández Fernández
Table of Contents
About the Authors������������������������������������������������������������������������������xiii

About the Technical Reviewers����������������������������������������������������������xv


Acknowledgments����������������������������������������������������������������������������xvii
Preface����������������������������������������������������������������������������������������������xix
Acronyms������������������������������������������������������������������������������������������xxi
Intended Audience���������������������������������������������������������������������������xxiii
Additional Material������������������������������������������������������������������������� xxvii

Chapter 1: Getting Started with Streamlit��������������������������������������������1


1.1 Why Streamlit?������������������������������������������������������������������������������������������������1
1.1.1 Local vs. the Cloud���������������������������������������������������������������������������������2
1.1.2 A Trend Toward Cloud Computing�����������������������������������������������������������3
1.1.3 History of Web Frameworks in Python���������������������������������������������������5
1.1.4 Flask�������������������������������������������������������������������������������������������������������6
1.1.5 Django����������������������������������������������������������������������������������������������������6
1.1.6 Dash�������������������������������������������������������������������������������������������������������7
1.1.7 Web2Py���������������������������������������������������������������������������������������������������7
1.1.8 The Need for a Pure Python Web Framework�����������������������������������������8
1.1.9 Academic Significance���������������������������������������������������������������������������8
1.2 Firing It Up������������������������������������������������������������������������������������������������������9
1.2.1 Technical Requirements�������������������������������������������������������������������������9
1.2.2 Environment Installation with Anaconda����������������������������������������������10

v
Table of Contents

1.2.3 Downloading and Installing Streamlit���������������������������������������������������15


1.2.4 Streamlit Console Commands��������������������������������������������������������������17
1.2.5 Running Demo Apps�����������������������������������������������������������������������������19
1.2.6 Writing and Testing Code with PyCharm�����������������������������������������������21
1.3 How Streamlit Works������������������������������������������������������������������������������������25
1.3.1 The Streamlit Architecture��������������������������������������������������������������������26
1.3.2 ReactJS in Streamlit�����������������������������������������������������������������������������29
1.4 Summary������������������������������������������������������������������������������������������������������30

Chapter 2: Streamlit Basics����������������������������������������������������������������31


2.1 Creating a Basic Application�������������������������������������������������������������������������31
2.1.1 Generating User Input Forms����������������������������������������������������������������32
2.1.2 Introducing Conditional Flow����������������������������������������������������������������34
2.1.3 Managing and Debugging Errors����������������������������������������������������������36
2.2 Mutating Dataframes������������������������������������������������������������������������������������40
2.2.1 Filter�����������������������������������������������������������������������������������������������������41
2.2.2 Select���������������������������������������������������������������������������������������������������42
2.2.3 Arrange�������������������������������������������������������������������������������������������������44
2.2.4 Mutate��������������������������������������������������������������������������������������������������46
2.2.5 Group By�����������������������������������������������������������������������������������������������48
2.2.6 Merge���������������������������������������������������������������������������������������������������49
2.3 Rendering Static and Interactive Charts�������������������������������������������������������52
2.3.1 Static Bar Chart������������������������������������������������������������������������������������52
2.3.2 Static Line Chart�����������������������������������������������������������������������������������53
2.3.3 Interactive Line Chart���������������������������������������������������������������������������55
2.3.4 Interactive Map�������������������������������������������������������������������������������������57
2.4 Developing the User Interface�����������������������������������������������������������������������58
2.5 Summary������������������������������������������������������������������������������������������������������62

vi
Table of Contents

Chapter 3: Architecting the User Interface�����������������������������������������63


3.1 Designing the Application�����������������������������������������������������������������������������64
3.1.1 Configuring the Page����������������������������������������������������������������������������64
3.1.2 Developing Themes and Color schemes�����������������������������������������������77
3.1.3 Organizing the Page�����������������������������������������������������������������������������81
3.2 Displaying Dynamic Content�������������������������������������������������������������������������85
3.2.1 Creating a Real-Time Progress Bar������������������������������������������������������87
3.3 Provisioning Multipage Applications�������������������������������������������������������������88
3.3.1 Creating Pages�������������������������������������������������������������������������������������88
3.3.2 Creating Subpages�������������������������������������������������������������������������������91
3.4 Modularizing Application Development���������������������������������������������������������94
3.4.1 Example: Developing a Social Network Application�����������������������������95
3.4.2 Best Practices for Folder Structuring�������������������������������������������������101
3.5 Summary����������������������������������������������������������������������������������������������������104

Chapter 4: Data Management and Visualization������������������������������105


4.1 Data Management���������������������������������������������������������������������������������������106
4.1.1 Processing Bytes Data������������������������������������������������������������������������106
4.1.2 Caching Big Data��������������������������������������������������������������������������������108
4.1.3 Mutating Data in Real Time����������������������������������������������������������������111
4.1.4 Advanced and Interactive Data Mutation��������������������������������������������113
4.2 Exploring Plotly Data Visualizations������������������������������������������������������������120
4.2.1 Rendering Plotly in Streamlit��������������������������������������������������������������120
4.2.2 Basic Charts���������������������������������������������������������������������������������������121
4.2.3 Statistical Charts��������������������������������������������������������������������������������125
4.2.4 Time-Series Charts�����������������������������������������������������������������������������127
4.2.5 Geospatial Charts�������������������������������������������������������������������������������128
4.2.6 Animated Visualizations����������������������������������������������������������������������128
4.3 Summary����������������������������������������������������������������������������������������������������131

vii
Table of Contents

Chapter 5: Database Integration�������������������������������������������������������133


5.1 Relational Databases����������������������������������������������������������������������������������133
5.1.1 Introduction to SQL�����������������������������������������������������������������������������134
5.1.2 Connecting a PostgreSQL Database to Streamlit�������������������������������136
5.1.3 Displaying Tables in Streamlit������������������������������������������������������������141
5.2 Nonrelational Databases�����������������������������������������������������������������������������144
5.2.1 Introduction to MongoDB��������������������������������������������������������������������145
5.2.2 Provisioning a Cloud Database�����������������������������������������������������������146
5.2.3 Full-Text Indexing�������������������������������������������������������������������������������150
5.2.4 Querying the Database�����������������������������������������������������������������������152
5.2.5 Displaying Tables in Streamlit������������������������������������������������������������157
5.3 Summary����������������������������������������������������������������������������������������������������160

Chapter 6: Leveraging Backend Servers������������������������������������������161


6.1 The Need for Backend Servers�������������������������������������������������������������������161
6.2 Frontend-Backend Communication������������������������������������������������������������162
6.2.1 HTTP Methods������������������������������������������������������������������������������������163
6.3 Working with JSON Files�����������������������������������������������������������������������������164
6.4 Provisioning a Backend Server�������������������������������������������������������������������165
6.4.1 API Building����������������������������������������������������������������������������������������166
6.4.2 API Testing������������������������������������������������������������������������������������������170
6.5 Multithreading and Multiprocessing Requests�������������������������������������������171
6.6 Connecting Streamlit to a Backend Server�������������������������������������������������174
6.7 Summary����������������������������������������������������������������������������������������������������177

viii
Table of Contents

Chapter 7: Implementing Session State�������������������������������������������179


7.1 Implementing Session State Natively���������������������������������������������������������179
7.1.1 Building an Application with Session State����������������������������������������182
7.2 Introducing Session IDs������������������������������������������������������������������������������185
7.3 Implementing Session State Persistently���������������������������������������������������186
7.4 User Insights�����������������������������������������������������������������������������������������������191
7.4.1 Visualizing User Insights���������������������������������������������������������������������195
7.5 Cookie Management�����������������������������������������������������������������������������������198
7.6 Summary����������������������������������������������������������������������������������������������������202

Chapter 8: Authentication and Application Security������������������������203


8.1 Developing User Accounts��������������������������������������������������������������������������203
8.1.1 Hashing����������������������������������������������������������������������������������������������204
8.1.2 Salting������������������������������������������������������������������������������������������������205
8.2 Verifying User Credentials���������������������������������������������������������������������������207
8.3 Secrets Management����������������������������������������������������������������������������������224
8.4 Anti-SQL Injection Measures with SQLAlchemy������������������������������������������225
8.5 Configuring Gitignore Variables�������������������������������������������������������������������226
8.6 Summary����������������������������������������������������������������������������������������������������227

Chapter 9: Deploying Locally and to the Cloud���������������������������������229


9.1 Exposing Streamlit to the World Wide Web�������������������������������������������������230
9.1.1 Port Forwarding over a Network Gateway������������������������������������������230
9.1.2 HTTP Tunneling Using NGROK�������������������������������������������������������������232
9.2 Deployment to Streamlit Cloud�������������������������������������������������������������������235
9.2.1 One-Click Deployment������������������������������������������������������������������������235
9.2.2 Streamlit Secrets��������������������������������������������������������������������������������238

ix
Table of Contents

9.3 Deployment to Linux�����������������������������������������������������������������������������������240


9.3.1 Native Deployment on a Linux Machine���������������������������������������������240
9.3.2 Deployment with Linux Docker Containers�����������������������������������������243
9.4 Deployment to Windows Server������������������������������������������������������������������246
9.4.1 Establishing a Remote Desktop Connection���������������������������������������247
9.4.2 Opening TCP/IP Ports��������������������������������������������������������������������������249
9.4.3 Anaconda Offline Package Installation�����������������������������������������������253
9.4.4 Adding Anaconda to System Path�������������������������������������������������������254
9.4.5 Running Application as an Executable Batch File�������������������������������256
9.4.6 Running Application As a Persistent Windows Service����������������������257
9.5 Summary����������������������������������������������������������������������������������������������������261

Chapter 10: Building Streamlit Components������������������������������������263


10.1 Introduction to Streamlit Custom Components�����������������������������������������263
10.2 Using ReactJS to Create Streamlit Custom Components��������������������������264
10.2.1 Making a ReactJS Component���������������������������������������������������������265
10.2.2 Using a ReactJS Component in Streamlit�����������������������������������������268
10.2.3 Sending Data to the Custom Component������������������������������������������270
10.2.4 Receiving Data from the Custom Component�����������������������������������273
10.3 Publishing Components As Pip Packages�������������������������������������������������276
10.4 Component in Focus: Extra-Streamlit-­Components����������������������������������280
10.4.1 Stepper Bar��������������������������������������������������������������������������������������280
10.4.2 Bouncing Image��������������������������������������������������������������������������������286
10.4.3 Tab Bar����������������������������������������������������������������������������������������������290
10.4.4 Cookie Manager�������������������������������������������������������������������������������295
10.4.5 Router�����������������������������������������������������������������������������������������������302
10.5 Summary��������������������������������������������������������������������������������������������������307

x
Table of Contents

Chapter 11: Streamlit Use Cases������������������������������������������������������309


11.1 Dashboards and Real-Time Applications��������������������������������������������������309
11.1.1 Temperature Data Recorder Application�������������������������������������������310
11.1.2 Motor Command and Control Application�����������������������������������������316
11.2 Time-Series Applications��������������������������������������������������������������������������321
11.2.1 Date-Time Filter Application�������������������������������������������������������������321
11.2.2 Time-Series Heatmap Application����������������������������������������������������324
11.2.3 Time Synchronization Application�����������������������������������������������������328
11.3 Data Management and Machine Learning Applications����������������������������332
11.3.1 Data Warehouse Application�������������������������������������������������������������332
11.3.2 Advanced Application Development: Machine Learning As a
Service����������������������������������������������������������������������������������������������344
11.4 Summary��������������������������������������������������������������������������������������������������361

Chapter 12: Streamlit at Work����������������������������������������������������������363


12.1 Streamlit in Clean Energy: Iberdrola���������������������������������������������������������363
12.1.1 Visualizing Operational Performance of Wind Farms������������������������365
12.1.2 Wind Turbine Power Curves��������������������������������������������������������������366
12.1.3 Wind Roses���������������������������������������������������������������������������������������369
12.1.4 Heat Maps����������������������������������������������������������������������������������������371
12.1.5 Closing Remarks������������������������������������������������������������������������������372
12.2 Streamlit in Industry: maxon Group����������������������������������������������������������373
12.2.1 Developing a Novel Surgical Scope Adapter System for Minimally
Invasive Laparoscopy�����������������������������������������������������������������������374
12.2.2 Streamlit Command and Control Dashboard������������������������������������377
12.2.3 Closing Remarks������������������������������������������������������������������������������378
12.3 Summary��������������������������������������������������������������������������������������������������379

xi
Table of Contents

Appendix A: Streamlit Application Program Interface���������������������381


A.1 The Streamlit API����������������������������������������������������������������������������������������381
A
 .1.1 Displaying Text�����������������������������������������������������������������������������������381
A
 .1.2 Displaying Data����������������������������������������������������������������������������������397
A
 .1.3 Displaying Charts�������������������������������������������������������������������������������402
A
 .1.4 Input Widgets�������������������������������������������������������������������������������������416
A
 .1.5 Displaying Interactive Widgets�����������������������������������������������������������443
A
 .1.6 Page Structure�����������������������������������������������������������������������������������447
A.1.7 Displaying Status and Progress���������������������������������������������������������451
A
 .1.8 Utilities�����������������������������������������������������������������������������������������������455
A.1.9 Session State Management���������������������������������������������������������������459
A
 .1.10 Data Management����������������������������������������������������������������������������461
A
 .1.11 The Hamburger Menu�����������������������������������������������������������������������467

Bibliography�������������������������������������������������������������������������������������469

Index�������������������������������������������������������������������������������������������������473

xii
About the Authors
Mohammad Khorasani is a hybrid of
an engineer and a computer scientist
with a Bachelor of Science in Mechanical
Engineering from Texas A&M University and a
master’s degree in Computer Science from the
University of Illinois at Urbana-Champaign.
Mohammad specializes in developing and
implementing software solutions for the
advancement of renewable energy systems and services at Iberdrola. In
addition, he develops robotic devices using embedded systems and rapid
prototyping technologies. He is also an avid blogger of STEM-related topics
on Towards Data Science – a Medium publication.
linkedin.com/in/mkhorasani/

Mohamed Abdou is a software engineer with


diverse academic and industrial exposure,
a graduate of Computer Engineering from
Qatar University, and currently an Software
Development Engineer at Amazon. Mohamed
has built a variety of open source tools used by
tens of thousands in the Streamlit community.
He led the first Google Developer Student Club
in Qatar and represented Qatar University in
national and international programming contests. He is a cyber security
enthusiast and was ranked second nationwide in bug bounty hunting in
Qatar in 2020 among under 25-year-­olds.
linkedin.com/in/mohamed-­ashraf-­abdou/

xiii
About the Authors

Javier Hernández Fernández specializes


in the area of technology innovation and
brings over 20 years of practical experience
in overseeing the design and delivery of
technological developments on behalf
of multinational companies in the fields
of IT, telecom, and utilities. He publishes
extensively, speaks at conferences around the
world, and spends his days wading through
piles of academic papers in the hope of finding something interesting.
He holds master’s degrees in both Energy Management and Project
Management, in addition to a BSc in Computer Science from the Faculty of
Engineering of the University of Ottawa.
linkedin.com/in/javier-­hernandezf/

xiv
About the Technical Reviewers
Rosario Moscato has a master’s degree in Electronic Engineering
(Federico II University, Naples) as well as a master’s degree in Internet
Software Design (CEFRIEL, Milan). He also has a Diploma in Apologetics
(Pontifical Athenaeum Regina Apostolorum, Rome) and a master’s
degree in Science and Faith (Pontifical Athenaeum Regina Apostolorum,
Rome). Rosario has gained over 20 years of experience, always
focusing his attention on the development and fine-tuning of the most
innovative technologies in various international companies in Europe
and Asia, covering various highly technical, commercial, and business
development roles.
In recent years, his interest has focused exclusively on artificial
intelligence and data science, pursuing, on one hand, the goal of
enhancing and making every business extremely competitive by
introducing and supporting machine and deep learning technologies
and on the other hand, analyzing the ethical-philosophical implications
deriving from the new scenarios that these disciplines open up.
Rosario has authored two books, and he is a speaker at international
research centers and conferences as well as a trainer and technical/
scientific consultant on the huge and changing world of AI.
Currently, he is working as Senior Data Scientist with one of the biggest
multinational IT companies in the world.

Randy Zwitch is a data science and analytics professional with broad


industry experience in big data and data science. He is also an open
source contributor in the R, Python, and Julia programming language
­communities.

xv
Other documents randomly have
different content
concerned in the Riccio assassination, she was little inclined to lean
upon them as before. As the only remaining resource, she began to
give her confidence to the Earl of Bothwell and the Earl of Huntly,
two nobles of great power, but whose administration could not bring
her so much popularity. Bothwell was a man of coarse character,
fully as much disposed as any man in that age to gain his ambitious
ends by violence. As early as March 1561-2, he had formed a plan
for seizing the queen’s person, and carrying her to the castle of
Dumbarton, that he and the Duke of Chatelherault might enjoy the
government between them. He had since then been restored to
favour; but, so far from the queen having ever appeared to regard
him as a lover, she had, so lately as February 1565-6, promoted and
sanctioned his marriage to a friend of her own, a sister of the Earl of
Huntly. He seems now to have thought that an opportunity was
presented for his acquiring a mastery in Scotland. He caused the
wretched Darnley to be murdered at his lodging in the Kirk of Field,
near Edinburgh (March 12, 1567). Being suspected and accused of
this act, he submitted to a trial, but was able to overbear justice,
and to maintain his place in the queen’s councils.
Mary, consequently, suffered in reputation, though whether she was
aware of Bothwell’s guilt is to this day a matter of doubt; much less
is it certain that she had, as has been suspected, a guilty knowledge
of her husband’s death.
Having procured the countenance of some of the nobility to his
plans, Bothwell seized the queen at the river Almond (April 24), and
conducted her to his castle of Dunbar, where he kept her a prisoner,
as was generally believed, by her own consent. His wife being hastily
divorced, he married the queen (May 15), and thus seemed to have
fully attained the object of his ambition; but the Protestant leaders
rose in arms, took the queen away from him, and drove him into
banishment. Mary, as one suspected of horrible crimes, was
imprisoned in Lochleven Castle (June 17), and forced to sign a deed
of abdication in favour of her infant son, who was consequently
crowned as James VI., with the Earl of Moray as regent during his
minority (July 29).
‘Ane guid summer and har’est.’—C. F.
The queen and her husband were obliged,
immediately after their marriage, to set about the 1565. Aug. 6.
suppression of a rebellion. The measure they
adopted for raising troops was according to the custom and rule of
the Scottish government. ‘There was ane proclamation at the Mercat
Cross of Edinburgh, commanding all and sundry earls, lords, barons,
freeholders, gentlemen, and substantious yeomen, to address them
with fifteen days victuals, to pass and convoy the king and queen to
the parts of Fife, under the pain of tinsel [loss] of life, lands, and
guids; and also commanding all and sundry the inhabitants of the
burgh of Edinburgh, betwixt sixteen and sixty, to address them in
the same manner, under the pains aforesaid.’—D. O. On the 22d of
the month, this order was extended to ‘all our sovereign’s lieges.’
This feudal mode of raising an army was felt as a
serious burden, particularly in the larger towns, 1565.
where industry had attained, of course, the highest
organisation. For the Rothschilds of Edinburgh, such as they were,
there was another trouble. The mode of raising money adopted by
Henry and Mary was not quite what would suit the views of modern
men of that class. Sept. 27, ‘Our soveranes causit certain of the
principals of Edinburgh to come to them to Halyrudehouse, and after
their coming, some of free will, and some brought agains their will,
our soverane lady made ane orison to them, desiring them to lend
her certain sowms of money, whilk they refusit to do; and therefore
they were commandit to remain in ward within the auld tower
wherein my lord of Murray lodgit, wherein they remainit.’ Ultimately,
the two difficulties were in a manner solved by each other. On the
6th of October, the above-mentioned notables of the city ‘agreeit
with our soveranes in this manner, to lend their majesties ten
thousand merks, upon the superiority of Leith, under reversion ...
and alse to give their highnesses ane thousand pounds, to suffer the
haill town to remain at hame.’
For some time after, the criminal records abound in cases of persons
‘delatit for abiding from the queen’s host.’ On such occasions, some
are found excusing themselves on account of sickness or personal
infirmity; others plead their having sent substitutes. When no excuse
could be made, fines are imposed. On the whole, it appears to have
been a public burden of no light character, and during the reign of
Mary, and the subsequent regencies, it was, owing to the great
troubles of the country, of frequent occurrence.

‘Great herships and oppression in mony parts of Scotland, in


Strathearn, in Lennox, in Glenalmond, in Breadalbin; baith slaughter
and oppression being made in sundry other parts by the Earl of
Argyle and M‘Gregor and their accomplices. Siclike in Strathardle,
mony men slain by the men of Athole and the Stuarts of Lorn.’—C. F.

The town-council of Edinburgh were accustomed


annually, at this time, to bestow upon their chief a Nov.
bullock, which was called The Provost’s Ox, twelve
pounds Scots being allowed for the purpose of buying the best that
was to be had. They also now gave him a tun of wine, and twelve
ells of velvet to make him a gown, as an acknowledgment of special
services he had done to the city.—City Register, apud Maitland.

‘... it was ordainit by the ministers, exhorters, and


readers of this realm, that they should begin ane 1565-6. Mar. 2.
public abstinence fra that day aucht hours
afternoon, whilk was Saturday, unto Sunday at five hours at even,
and then to take but bread and drink, and that in ane sober manner,
during the whilk time the people to be occupiet in prayers and
hearing the word of God; and as meikle to be done the next Sunday
thereafter, for to pray to the eternal God that he wald saften and
pacify his angry wrath whilk appearandly is come upon us for our
sins, and specially that God wald inform, mollify, and make soft the
hearts of our sovereigns towards our nobility whilk are now banished
in England....’—D. O.
These nobles were meanwhile arranging very active measures by the
arm of flesh to bring about the desired change. Before the second
fast had taken place, Riccio lay cold with his fifty-six wounds in the
ante-chamber of Holyrood, the palace was in the hands of Morton,
and the exiled lords had returned to Edinburgh.

Paul Methven, originally a baker in Dundee,


afterwards minister of Jedburgh, for an immorality 1566. June.
of a gross kind, was excommunicated by the
General Assembly in 1563. He was from the first penitent, offering to
submit to any punishment which the church might impose for his
offence, ‘even if it were to lose any member of his body.’ After two
or three years of troubles and buffetings to and fro, he succeeded in
inducing the Assembly to look mildly on his case. ‘It was ordainit
that he present himself personally before the Assembly, and, being
entrit, [he] prostrate[d] himself before the whole brethren with
weeping and howling, and, being commandit to rise, might not
express farther his request, being, as appeared, so sore troublit with
anguish of heart.’ The penance imposed gives a striking idea of the
discipline of these Calvinistic fathers: ‘The said Paul upon the twa
preaching-days betwixt the Sundays, sall come to the kirk door of
Edinburgh when the second bell rings, clad in sackcloth, bareheaded
and barefooted, and there remain while [until] he be brought in to
the sermon, and placed in the public spectacle above the people ...
in the next Sunday after sall declare signs of his inward repentance
to the people, humbly requiring the kirk’s forgiveness; whilk done,
he sall be clad in his awn apparel, and received in the society of the
kirk as ane lively member thereof.’

A prince, who subsequently became James VI.,


was born to the queen in Edinburgh Castle, within 1566. June 19.
that small irregularly shaped room, of about eight
feet each way, which is still to be seen in the angle of the old palace.
The wet-nurse of the royal babe was a certain Lady Reres, whose
name occurs unpleasantly in the subsequent history of Mary. At the
same time, the Countess of Athole, who was believed to have
magical gifts, was brought to bed in the Castle. In a conversation
which took place five years after, at Fallside in Fife, between one
Andrew Lundie and John Knox, the former related that, ‘when the
queen was lying in gisson of the king, the Lady Athole, lying there
likewise, baith within the Castle of Edinburgh, he came there for
some business, and callit for the Lady Reres, whom he fand in her
chalmer, lying bedfast, and, he asking of her disease, she answerit
that she was never so troubled with no bairn that ever she bare, for
the Lady Athole had casten all the pyne of her childbirth upon her.’36
It was a prevalent belief of that age that the pains of parturition
could be transferred by supernatural art, and not merely to another
woman, but to a man or to one of the lower animals. Amongst the
charges against an enchantress of the upper ranks called Eupham
M‘Calyean, twenty-five years after this time, is one to the effect,
that, for relief of her pain at the time of the birth of her two sons,
she had had a bored stone laid under her pillow, and enchanted
powder rolled up in her hair—likewise ‘your guidman’s sark tane aff
him, and laid womplit under your bed-feet; the whilk being practisit,
your sickness was casten aff you unnaturally, upon ane dog, whilk
ran away and was never seen again.’37
‘The Earl of Bedford, accompanied with forty
horsemen, Englishmen, come as ambassador frae 1566. Dec. 10.
the queen’s majesty of England, to nominate ane Dec. 17.
woman in Scotland, to be cummer to our
sovereigns, to the baptising of our prince, their son, to the burgh of
Edinburgh, and was lodgit in my lord duke’s lodging at the Kirk of
Field. In his coming in Edinburgh, he was honourably convoyit by the
gentlemen of Lothian, but for the maist part by them of the Religion,
because the said earl favourit the same greatumly. The said earl
brought ane font, frae the queen’s grace of England, of twa stane
wecht, to be presentit to our sovereigns, in the whilk their son and
our prince should be baptisit; the same was of fine gold. And he
brought ane ring with ane stane, to be delivered to the said woman
wha should occupy the place of the queen’s grace of England in the
time of the said baptising.’—D. O.
The young prince was baptised at Stirling Castle, and named Charles
James. The preparations in apparel and decorations were
magnificent beyond everything of the kind hitherto known. ‘The said
prince was borne out of his chalmer to the chapel by the French
ambassador, my Lady of Argyle, cummer for the Queen of England
by commission, and Monsieur La Croc for the Duke of Savoy. All the
barons and gentlemen bore prickets of wax, wha stood in rank on ilk
side, frae the prince’s chalmer door to the said chapel. Next the
French ambassador, ane great serge of wax by the Earl of Athole,
the salt-vat by the Earl of Eglintoun, the cude by the Lord Semple,
the basin and laver by the Lord Ross; and at the chapel door, the
prince was receivit by my Lord Sanct Androis, wha was executor
officii in pontificalibus, with staff, mitre, cross, and the rest.
Collaterals to him were the Bishops of Dunkeld [and] Dumblane,
with their rochets and hoods; and also assistit with rochets and
hoods the Bishop of Ross, the Prior of Whithorn, and sundry others
with serpclaiths and hoods, and the hale college of the chapel royal,
with their habits and u[p]maist copes[?]. The prince was baptisit in
the said font, and thir solemnities endit by near five hours afternoon,
with singing and playing on organs.’—D. O.
It appears that at these festivities the skeleton was not wanting.
‘There was sitting in the entry of the Castle a poor man asking alms,
having a young child upon his knee, whose head was so great
[hydrocephalus?] that the body of the child could scarce bear it up.
A certain gentleman perceiving it, could scarce refrain from tears, for
fear of the evils he judged to be portended.’—Knox.

‘... At twa hours in the morning, there come


certain traitors to the provost’s house [in the Kirk 1566-7. Feb. 10.
of Field], wherein was our sovereign’s husband
Henry, and ane servant of his, callit William Taylor, lying in their
naked beds; and there privily with wrang keys openit the doors, and
come in upon the said prince, and there without mercy worried him
and his said servant in their beds; and thereafter took him and his
servant furth of that house, and cuist him naked in ane yard beside
the Thief Raw, and syne come to the house again, and blew the
house in the air, sae that there remainit not ane stane upon ane
other, undestroyit.... At five hours, the said prince and his servant
was found lying dead in the said yard, and was ta’en into ane house
in the Kirk of Field, and laid while [till] they were buriet.’—D. O.
Buchanan relates two ‘prodigies’ which happened in connection with
the death of Darnley. ‘One John Lundin, a gentleman of Fife, having
long been sick of a fever, the day before the king was killed, about
noon, raised himself a little in his bed, and, as if he had been
astonished, cried out to those that stood by him, with a loud voice,
“to go help the king, for the parricides were just then murdering
him;” and a while after he called out with a mournful tone, “Now it is
too late to help him; he is already murdered;” and he himself lived
not long after he had uttered these words.’ The other circumstance
occurred just at the time the murder happened. ‘Three of the
familiar friends of the Earl of Athole, the king’s cousin, men of
reputation for valour and estate, had their lodgings not far from the
king’s. When they were asleep about midnight, there was a certain
man seemed to come to Dugald Stewart, who lay next the wall, and
to draw his hand gently over his beard and cheek, so as to awake
him, saying, “Arise, they are offering violence to you.” He presently
awaked, and was considering the apparition within himself, when
another of them cries out presently in the same bed, “Who kicks
me?” Dugald answered, “Perhaps it is a cat, which used to walk
about in the night;” upon which the third, who was not yet awake,
rose presently out of his bed, and stood upon the floor, demanding
“who it was that had given him a box on the ear?” As soon as he
had spoken, a person seemed to go out of the house by the door,
and that not without some noise. Whilst they were descanting on
what they had heard and seen, the noise of the blowing up of the
king’s house put them into a very terrible consternation.’

‘... whilk was Sanct Mark’s even, our sovereign


lady, riding frae Stirling (whereto she passed a 1567. Apr. 24.
little before to visie her son) to Edinburgh, James
Earl of Bothwell, accompaniet with seven or aucht hundred men and
friends, whom he causit believe that he would ride upon the thieves
of Liddesdale, met our sovereign lady betwixt Kirkliston and
Edinburgh, at ane place called the Briggis, accompaniet with ane few
number, and there took her person, [which he conducted] to the
castle of Dunbar. The rumour of the ravishing of her majesty coming
to the provost of Edinburgh, incontinent the common bell rang, and
the inhabitants ran to armour and weapons, the ports was steekit,
[and] the artillery of the Castle shot.’—D. O.
The place indicated was well chosen for the purpose, being in an
angle of ground enclosed by the Almond River and the Gogar Burn,
which meet here; so that the queen and her little party could not
have fled except at considerable risk. The post-road from Linlithgow
to Edinburgh still passes by the spot, immediately after crossing the
river Almond by the Boat-house Bridge.38 Thus characterised, it is
perhaps of all places on the road from Linlithgow to Edinburgh, that
which Bothwell might be expected to choose if he had been in no
collusion with the queen, and anxious to take her at advantage.

The queen had time at this remarkable crisis of her


history—when just about to be married to Bothwell May 11.
—to grant a letter to ‘the cunning men of the
occupation and craft of chirurgeons,’ freeing them from the duty of
attending hosts and wappenshaws, and also from that of ‘passing
upon inquests and assizes,’ in order that they might have ‘the
greater occasion to study the perfection of the said craft, to the
uttermost of their ingynes [abilities].’39
There is a common belief that surgeons and butchers are exempt
from serving on juries, on account of the assumed effect of their
profession in making them reckless as to destruction of life. Perhaps
the notion has in part taken its rise in this exemption from service
for the surgeons, though it appears to have been granted on more
honourable consideration.
REGENCY OF MORAY: 1567-1570.
Mary remained a prisoner in Lochleven Castle for ten months, while
Moray, as Regent, maintained a good understanding with England,
and did much to enforce internal peace and order. At length (May
1568), the unhappy Queen made her escape, and threw herself into
the arms of the powerful family of Hamilton, who had continued
unreconciled to the new government. They raised for her a
considerable body of retainers, and for a few days she seemed to
have a chance of recovering her authority; but her army was
overthrown at Langside by the Regent, and she had then no
resource but to pass into England, and ask refuge with Queen
Elizabeth. By her she was received with a show of civility, but was in
reality treated as a prisoner, and even subjected to the indignity of a
kind of trial, where her brother Moray acted as her accuser. The
proofs brought forward for her guilt were such as not to allow of any
judgment being passed against her by Elizabeth, and it cannot be
said that they have secured a decidedly unfavourable verdict from
posterity. The series of circumstances is, no doubt, calculated to
excite suspicion; yet they are not incompatible with the theory; that
she was trained into them by others; and it must be admitted that
one who had previously lived so blamelessly—rejecting the suit of
Bothwell when they were both free persons—and who afterwards
made so noble an appearance when adjudged to a cruel death for
offences of which she was innocent, was not the kind of person
likely to have assisted in murdering a husband, or to have
deliberately united herself to one whom she believed to be his
murderer.
Under a protestant Regent, with the friendship and aid of Elizabeth,
whose interest it was to keep popery out of the whole island,
Scotland might have enjoyed some years of tranquillity. Moray,
whatever opinion may be entertained of his conduct towards his
sister, proved a vigorous and just ruler, insomuch as to gain the title
of the Good Regent; but he was early cut off in his course, falling a
victim to private revenge at Linlithgow (January 23, 1569-70).

The long-enduring system of predatory warfare


carried on by the borderers against England 1567. Oct.
rendered them a lawless set at all times; but in the
present state of the government, they were unusually troublesome.
‘In all this time,’ says the Diurnal of Occurrents, ‘frae the queen’s
grace’ putting in captivity to this time, the thieves of Liddesdale
made great hership on the poor labourers of the ground, and that
through wanting of justice; for the realm was sae divided in sundry
factions and conspirations, that there was nae authority obeyed, nor
nae justice execute.’—D. O.
Sir Richard Maitland of Lethington gives us a lively
description of these men and their practices: 1567.

‘Of Liddesdale the common thieves


Sae pertly steals now and reaves,
That nane may keep
Horse, nolt, or sheep,
For their mischieves.

They plainly through the country rides,


I trow the meikle De’il them guids,
Where they onset,
Ay in their gait,
There is nae yett,
Nor door, them bides.

Thae thieves that steals and turses40 hame


Ilk ane of them has ane to-name,41
Will of the Laws,
Hab of the Shaws;
To mak bare wa’s,
They think nae shame.

They spulyie puir men of their packs,


They leave them nought on bed nor balks,42
Baith hen and cock,
With reel and rock,
The Laird’s Jock
All with him taks.

They leave not spendle, spoon, nor spit,


Bed, bolster, blanket, sark, nor sheet;
John of the Park
Rypes43 kist and ark;
For all sic wark
He is right meet.

He is weel-kenned, Jock of the Syde,


A greater thief did never ride.
He never tires
For to break byres;
O’er muir and mires,
O’er guid ane guide....

Of stouth44 though now they come good speed,


That nother of God nor men has dread,
Yet or45 I die,
Some shall them see
Hing on a tree,
While46 they be dead.’47

If it was at this time, as is likely, that Sir Richard wrote these verses,
he might well calculate on the vigour of the Regent while
prophesying sad days for the Border men.
‘... there was ane proclamation [October 10], to meet the Regent in
Peebles upon the 8 of November next, for the repressing of the
thieves in Annandale and Eskdale; but my Lord Regent thinking they
wald get advertisement, he prevented the day, and came over the
water secretly, and lodged in Dalkeith; this upon the 19 day
[October]; and upon the morrow he departed towards Hawick,
where he came both secretly and suddenly, and there took thirty-
four thieves, whom he partly caused hang and partly drown; five he
let free upon caution; and upon the 2nd day of November, he
brought other ten with him to Edinburgh, and there put them in
irons.’—Bir.
We have some trace of these men in the Lord Treasurer’s accounts
as inmates of the Tolbooth of Edinburgh. On the 30th of November,
thirty-two pounds are paid to Andro Lindsay, keeper of that prison,
for the furnishing of meat and drink to Robert Elliot, alias Clement’s
Hob, and Archy Elliot, called Archy Kene. On the same day, twenty-
three pounds four shillings are disbursed for a month’s board in the
same black hotel, for ‘Robert Elliot, called Mirk Hob; Gavin Elliot,
called Gawin of Ramsiegill; Martin Elliot, called Martin of Heuchous;
Robert Elliot, son to Elder Will; Robert Elliot, called the Vicar’s Rob;
Robert Elliot, called Hob of Thorlieshope; Dandy Grosar, called
Richardtoncleucht; and Robert Grosar, called Son to Cockston.’
In an act of the Privy Council, 6th November 1567,
it is alleged that the thieves of Liddesdale, and 1567.
other parts of the Scottish Border, have been in the
habit, for some time past, of taking sundry persons prisoners, and
giving them up upon ransom—exactly the conduct of the present
banditti of the Apennines. It is also averred that many persons are
content to pay ‘black-mail’ to these thieves, and sit under their
protection, ‘permittand them to reif, herry, and oppress their
neighbours in their sicht, without contradiction or stop.’ Such
practices were now forbidden under severe penalties; and it was
enjoined that ‘when ony companies of thieves or broken men comes
ower the swires within the in-country,’ all dwelling in the bounds
shall ‘incontinent cry on hie, raise the fray, and follow them, as weel
in their in-passing as out-passing,’ in order to recover the property
which may have been stolen.

Walter Scott of Harden, a famous Border chief, was this year married
to Mary Scott of Dryhope, commonly called the Flower of Yarrow.
The pair had six sons, from five of whom descended the families of
Harden (which became extinct); Highchesters, now represented by
Lord Polwarth, Raeburn (from which came Sir Walter Scott of
Abbotsford), Wool, and Synton; and six daughters, all of whom were
married to gentlemen of figure, and all had issue.
It is a curious consideration to the many descendants of Walter Scott
of Harden, that his marriage-contract is signed by a notary, because
none of the parties could write their names. The father-in-law, Scott
of Dryhope, bound himself to find Harden in horse meat and man’s
meat, at his own house, for a year and day; and five barons
engaged that he should remove at the expiration of that period,
without attempting to continue in possession by force.
Harden was a man of parts and sagacity, and living to about the
year 1629, was popularly remembered for many a day thereafter
under the name of ‘Auld Watt.’ One of his descendants relates the
following anecdote of him:—‘His sixth son was slain at a fray, in a
hunting-match, by Scott of Gilmanscleuch. His brothers flew to arms;
but the old laird secured them in the dungeon of his tower, hurried
to Edinburgh, stated the crime, and obtained a gift of the lands of
the offenders from the crown. He returned to Harden with equal
speed, released his sons, and shewed them the charter. “To horse,
lads!” cried the savage warrior, “and let us take possession! The
lands of Gilmanscleuch are well worth a dead son.”’48
Bessie Tailiefeir, in the Canongate, Edinburgh,
having slandered Bailie Thomas Hunter by saying Oct. 30.
‘he had in his house ane false stoup [measure],’
which was found not to be true, she was sentenced to be [brankit]
and set on the Cross for an hour.49
The punishment of branking, which was a
customary one for scolds, slanderers, and other 1567.
offenders of a secondary class, consisted in having
the head enclosed in an iron frame, from which projected a kind of
spike, so as to enter the mouth and prevent speech.

The Branks.
Charles Sandeman, cook, on being made a
Nov. 20.
member of the guild of Edinburgh, came under an
obligation that, from that time forth, ‘he sall not be seen upon the
causey,’ like other cooks, carrying meat to sell in common houses,
but cause his servants pass with the same; and ‘he sall hald his
tavern on the Hie Gait ... and behave himself honestly in all time
coming, under pain of escheat of his wines.’—E. C. R.
‘... At 2 afternoon, the Laird of Airth and the Laird
of Wemyss met upon the Hie Gait of Edinburgh; Nov. 24.
and they and their followers faught a very bluidy
skirmish, where there was many hurt on both sides with shot of
pistol.’—Bir. Apparently in consequence of this affair, there was, on
the 27th, ‘a strait proclamation,’ discharging the wearing of culverins,
dags, pistolets, or ‘sic other firewerks,’ with injunctions that any one
contravening should be seized and subjected to summary trial, ‘as
gif they had committit recent slauchters.’—P. C. R.
This is the first of a series of street-fights by which the Hie Gait of
Edinburgh was reddened during the reign of James VI., and which
scarcely came to an end till his English reign was far advanced. It is
worthy of note that sword and buckler were at this time the ordinary
gear of gallant men in England—a comparatively harmless
furnishing; but we see that small firearms were used in Scotland.

An act of parliament was passed to prevent horses


being exported, it being found that so many had 1567. Dec. 15.
lately been taken to Bordeaux and other places
abroad, as to cause ‘great skaith’ by the raising of prices at home.

There has been a feeling of rivalry between Perth and Dundee from
time immemorial, and it probably will never cease while both towns
exist. At a parliament now held by the Regent Moray, the
representatives of each burgh strove for the next place after
Edinburgh in that equestrian procession which used to be called the
Riding of the Estates. A tumult consequently arose upon the street,
and it was with difficulty that this was stilled. Birrel relates how the
Regent was ‘much troubled to compose those two turbulent towns of
Perth and Dundee,’ and that ‘it was like to make a very great deal of
business, had not the same been mediate for the present by some
discreet men who dealt in the matter.’ Due investigation was
afterwards made (January 9, 1567-8), that it might be ascertained
‘in whais default the said tumult happenit.’ It was found that ‘James
Wedderburn and George Mitchell, burgesses of Dundee, and William
Rysie, bearer of the handsenyie [ensign] thereof,’ were no wise
culpable; and they were accordingly allowed to depart.

Alexander Blair younger of Balthayock, and George


Drummond of Blair, gave surety before the Privy Dec. 27.
Council for Alexander Blair of Freirton, near Perth,
‘that Jonet Kincraigie, spouse to the said Alexander, sall be harmless
and skaithless of him and all that he may let, in time coming, under
the pain of five hundred merks; and als that he sall resave the said
Jonet in house, and treat, sustene, and entertene her honestly as
becomes ane honest man to do to his wife, in time coming;’ besides
paying to her children by a former husband their ‘bairn’s part of
geir.’—P. C. R.

‘Robert Jack, merchant and burgess of Dundee,


was hangit and quarterit for false coin called Dec. 31.
Hardheads, whilk he had brought out of
Flanders.’—Bir. ‘Fals lyons callit hardheades, plakis, balbeis,50 and
other fals money,’ is the description given in another record,
literatim.
The hardhead was originally a French coin,
denominated in Guienne hardie, and identical with 1567.
the liard. It was of debased copper, and usually of
the value of three-halfpence Scotch; but further debasement was
oftener than once resorted to by Scottish rulers as a means of
raising a little revenue. Knox, in 1559, complains that ‘daily there
were such numbers of lions (alias called hardheads) prented, that
the baseness thereof made all things exceeding dear.’ So also the
Regent Morton increased his unpopularity by diminishing the value
of hardheads from three halfpence to a penny, and the plack-piece
from fourpence to twopence.51
Robert Jack had probably made a sort of mercantile speculation in
bringing in a debased foreign hardhead. The importance attached to
his crime is indicated by the payment (January 28, 1567-8) of £33,
6s. 8d. to George Monro of Dalcartie, for ‘expenses made by him
upon six horsemen and four footmen for the sure convoying of
Robert Jack, being apprehended in Ross for false cunyie.’

It may somewhat modify the views generally taken


of the destruction of relics of the ancient religion 1567-8. Jan. 5.
under the Protestant governments succeeding the
Reformation, that John Lockhart of Bar was denounced rebel at this
time for conveying John Macbrair forth of the castle of Hamilton, and
‘for down-casting of images in the kirk of Ayr and other places.’52
About the same time, the Regent learned that the lead upon the
cathedrals of Aberdeen and Elgin was in the course of being
piecemeal taken away. Thinking it as well that some public good
should be obtained from this material, the Privy Council ordered
(February 7, 1567-8) that the whole be taken down and sold for the
support of the army now required to reduce the king’s rebels to
obedience.

‘A play made by Robert Semple,’ was ‘played


before the Lord Regent and diverse others of the 1567-8. Jan. 17.
nobility.’—Bir. There have been several conjectures as to this play
and its author, with little satisfactory result. It was probably a very
simple representation of some historical scene or transaction, such
as we can imagine the life of the execrable Bothwell to have
gratefully furnished before such a company. Semple appears to have
been in such a rank of life as not to be above ordinary pecuniary
rewards for his services, as on the 12th of February there is an entry
in the treasurer’s books of £66, 13s. 4d. ‘to Robert Semple.’ He was
a fruitful, but dull writer, being the author of The Regentis Trajedie,
1570; The Bishopis Lyfe and Testament, 1571; My Lord Methvenis
Trajedie, 1572; and The Siege of the Castle of Edinburgh, 1573:
besides various poems preserved in the Bannatyne Manuscript.

Seeing that ‘in the spring of the year all kinds of


flesh decays and grows out of season, and that it Feb. 24.
is convenient for the commonweal that they be
sparit during that time, to the end that they may be mair plenteous
and better cheap the rest of the year,’ the Privy Council forbade the
use of flesh of any kind during ‘Lentern.’ Fleshers, hostelers, cooks,
and taverners, were forbidden to slay any animals for use during
that season hereafter, under pain of confiscation of their movable
goods.—P. C. R. This order was kept up in the same terms for many
years, a forced economy preserving a rule formerly based on a
religious principle.

The Regent granted a licence to Cornelius De Vois,


a Dutchman, for nineteen years, to search for gold Mar. 4.
and silver in any part of Scotland, ‘break the
ground, mak sinks and pots therein, and to put labourers thereto,’ as
he might think expedient, with assurance of full protection from the
government, paying in requital for every hundred ounces of gold or
silver which could be purified by washing, eight ounces, and for
every hundred of the same which required the more expensive
process of a purification by fire, four ounces.—P. C. R.
Stephen Atkinson, who speculated in the gold-
mines of Scotland a generation later, gives us53 1567-8.
some account of Cornelius De Vois, whom he calls
a German lapidary, and who, he says, had come to Scotland with
recommendations from Queen Elizabeth. According to this somewhat
foolish writer, ‘Cornelius went to view the said mountains in
Clydesdale and Nydesdale, upon which mountains he got a small
taste of small gold. This was a whetstone to sharpen his knife upon;
and this natural gold tasted so sweet as the honey-comb in his
mouth. And then he consulted with his friends at Edinburgh, and by
his persuasions provoked them to adventure with him, shewing them
at first the natural gold, which he called the temptable gold, or
alluring gold. It was in sterns, and some like unto birds’ eyes and
eggs: he compared it unto a woman’s eye, which entiseth her lover
into her bosom.’ Cornelius was not inferior to his class in speculative
extravagance. He found in his golden dreams a solution for the
question regarding the poor. He saw Scotland and England ‘both
oppressed with poor people which beg from door to door for want of
employment, and no man looketh to it.’ But all these people were to
find good and profitable employment if his projects were adopted.
We are not accustomed to consider our countrymen inferior in
energy and enterprise to the Germans. Yet Cornelius stated, that if
he had been able to shew in his own country such indications of
mineral wealth as he had found in Scotland, ‘then the whole country
would confederate, and not rest till young and old that were able be
set to work thereat, and to discover this treasure-house from
whence this gold descended; and the people, from ten years old till
ten times ten years old, should work thereat: no charges whatsoever
should be spared, till mountains and mosses were turned into valleys
and dales, but this treasure-house should be discovered.’
It appears that Cornelius so far prevailed on the Scots to
‘confederate,’ that they raised a stock of £5000 Scots, equal to about
£416 sterling, and worked the mines under royal privileges.
According to Atkinson, this adventurer ‘had sixscore men at work in
valleys and dales. He employed both lads and lasses, idle men and
women, which before went a-begging. He profited by their work,
and they lived well and contented.’ They sought for the valuable
metal by washing the detritus in the bottoms of the valleys,
receiving from their employer a mark sterling for every ounce they
realised. So long after as 1619, one John Gibson survived in the
village of Crawford to relate how he had gathered gold in these
valleys in pieces ‘like birds’ eyes and birds’ eggs,’ the best being
found, he said, in Glengaber Water, in Ettrick, which he sold for 6s.
8d. sterling per ounce to the Earl of Morton. Cornelius, within the
space of thirty days, sent to the cunyie-house in Edinburgh as much
as eight pound-weight of gold, a quantity which would now bring
£450 sterling.
What ultimately came of Cornelius’s adventure does not appear. He
vanishes notelessly from the field. We are told by Atkinson that the
adventure was subsequently taken up by one Abraham Grey, a
Dutchman heretofore resident in England, commonly called
Greybeard, from his having a beard which reached to his girdle. He
hired country-people at 4d. a day, to wash the detritus of the valleys
around Wanlock-head for gold; and it is added, that enough was
found to make ‘a very fair deep basin of natural gold,’ which was
presented by the Regent Morton to the French king, filled with gold
pieces, also the production of Scotland.
The same valleys were afterwards searched for
gold by an Englishman named George Bowes, who 1567-8.
also sunk shafts in the rock, but probably with
limited success, as has hitherto been experienced in ninety-nine out
of every hundred instances, according to Sir Roderick Murchison.
In consequence of an extremely dry summer, the yield of grain and
herbage in 1567 was exceedingly defective. The ensuing winter
being unusually severe, there was a sad failure of the means of
supporting the domestic animals. A stone of hay came to be sold in
Derbyshire at fivepence,54 which seems to have been regarded as a
starvation price. There was a general mortality among the sheep and
horses. In Scotland, the opening of 1568 was marked by scarcity
and all its attendant evils. ‘There was,’ says a contemporary
chronicler, ‘exceeding dearth of corns, in respect of the penury
thereof in the land, and that beforehand a great quantity thereof
was transported to other kingdoms: for remeed whereof inhibitions
were made sae far out of season, that nae victual should be
transported furth of the country under the pain of confiscation, even
then when there was no more left either to satisfy the indigent
people, or to plenish the ordinar mercats of the country as
appertenit.’—H. K. J.

During his short administration, the Regent Moray gave a large


portion of his time and attention to the repression of lawless people.
Justice was executed in no sparing manner. March 8, 1567-8, ‘the
Regent went to Glasgow, and there held ane justiceaire, where there
was execute about the number of twenty-eight persons for divers
crimes.’ July 1568, he ‘rade to St Andrews, and causit drown a man
callit Alexander Macker and six more, for piracy.’ Sep. 13, ‘the Lord
Regent rade to the fair to Jedburgh, to apprehend the thieves; but
they being advertised of his coming, came not to the fair; sae he
was frustrate of his intention, excepting three thieves whilk he took,
and caused hang within the town there.’—Bir. April 1569, the Regent
made a raid to the Border against the thieves, accompanied by a
party of English. ‘But the thieves keepit themselves in sic manner,
that the Regent gat nane thereof, nor did little other thing, except he
brint and reft the places of Mangerton and Whithope, with divers
other houses belonging to the said thieves.’—D. O.
In the same month, a number of the most
considerable persons in the southern counties 1567-8.
entered into a bond at Kelso, agreeing to be
obedient subjects to the Regent Earl of Moray, and to do all in their
power for the putting down of the thieves of Liddesdale, Ewesdale,
Eskdale, and Annandale, especially those of the names Armstrong,
Elliot, Nickson, Croser [Grozart?], Little, Bateson, Thomson, Irving,
Bell, Johnston, Glendoning, Routledge, Henderson, and Scott; not
resetting or intercommuning with them, their wives, bairns, tenants,
and servants, or suffering any meat or drink to be carried to them,
‘where we may let;’ also, if, ‘in case of the resistance or pursuit of
any of the said thieves, it sall happen to ony of them to be slain or
brint, or ony of us and our friends to be harmit by them, we sall ever
esteem the quarrel and deadly feid equal to us all, and sall never
agree with the said thieves but together, with ane consent and
advice.’55

Axel Wiffirt, servant of the king of Denmark, was


licensed to levy 2000 men of war in Scotland, and 1568. July 13.
to convey them away armed as culviriners on foot,
‘as they best can provide them,’ being to serve the Danish monarch
in his wars.56

‘Touran Murray, brother-german to the Laird of


Tullibardine, was shot and slain out of the place of July 15.
Auchtertyre, in Stratherne, by one Wood [Mad]
Andrew Murray and his confederates, who kept the said place certain
days, and slew some six persons more, yet made escape at that
present.’—Bir.
‘Ane called James Dalgliesh, merchant, brought the
pest in[to] Edinburgh.’—D. O. Sep. 8.

According to custom in Edinburgh, when this dire


visitor made his appearance, the families which 1568.
proved to be infected were compelled to remove,
with all their goods and furniture, out to the Burgh-moor, where they
lodged in wretched huts hastily erected for their accommodation.
They were allowed to be visited by their friends, in company with an
officer, after eleven in the forenoon; any one going earlier was liable
to be punished with death—as were those who concealed the pest in
their houses. Their clothes were meanwhile purified by boiling in a
large caldron erected in the open air, and their houses were ‘clengit’
by the proper officers. All these regulations were under the care of
two citizens selected for the purpose, and called Bailies of the Muir;
for each of whom, as for the cleansers and bearers of the dead, a
gown of gray was made, with a white St Andrew’s cross before and
behind, to distinguish them from other people. Another arrangement
of the day was, ‘that there be made twa close biers, with four feet,
coloured over with black, and [ane] white cross with ane bell to be
hung upon the side of the said bier, whilk sall mak warning to the
people.’57
The public policy was directed rather to the preservation of the
untainted, than to the recovery of the sick. In other words,
selfishness ruled the day. The inhumanity towards the humbler
classes was dreadful. Well might Maister Gilbert Skeyne, Doctour in
Medicine, remark in his little tract on the pest, now printed in
Edinburgh: ‘Every ane is become sae detestable to other (whilk is to
be lamentit), and specially the puir in the sight of the rich, as gif
they were not equal with them touching their creation, but rather
without saul or spirit, as beasts degenerate fra mankind.’58 This
worthy mediciner tells us, indeed, that he was partly moved to
publish his book by ‘seeand the puir in Christ inlaik [perish] without
assistance of support in body, all men detestand aspection, speech,
or communication with them.’
Dr Skeyne’s treatise, which consists of only forty-six very small
pages, gives us an idea of the views of the learned of those days
regarding the pest. He describes it as ‘ane feverable infection, maist
cruel, and sundry ways strikand down mony in haste.’ It proceeds, in
his opinion, from a corruption of the air, ‘whilk has strength and
wickedness above all natural putrefaction,’ and which he traces
immediately to the wrath of the just God at the sins of mankind.
There are, however, inferior causes, as stagnant waters, corrupting
animal matters and filth, the eating of unwholesome meat and
decaying fruits, and the drinking of corrupt water. Extraordinary
humidity in the atmosphere is also dwelt upon as a powerful cause,
especially when it follows in autumn after a hot summer. ‘Great
dearth of victual, whereby men are constrained to eat evil and
corrupt meats,’ he sets down as a cause much less notable. He does
not forget to advert to the suspicious intermeddling of comets and
shooting-stars. ‘Nae pest,’ he says, ‘continually endures mair than
three years;’ and he remarks how ‘we daily see the puir mair subject
to sic calamity nor the potent.’
Dr Skeyne’s regimen for the pest regards both its
prevention and its cure, and involves an immense 1568.
variety of curious recipes and rules of treatment,
expressed partly in Latin and partly in English. He ends by calling his
readers to observe—‘As there is diversity of time, country, age, and
consuetude to be observit in time of ministration of ony medicine
preservative or curative, even sae there is divers kinds of pest, whilk
may be easily knawn and divided by weel-learnit physicians, whase
counsel in time of sic danger of life is baith profitable and necessar,
in respect that in this pestilential disease every ane is mair blind nor
the moudiewort in sic things as concerns their awn health.’
There has been preserved a curious letter which Adam Bothwell,
bishop of Orkney, addressed in this time of plague to his brother-in-
law, Sir Archibald Napier of Merchiston, regarding the dangers in
which the latter was placed by the nearness of his house to the
bivouac of the infected on the Burgh-moor.59 It opens with an
allusion to Sir Archibald’s present position as a friend of Queen Mary
in trouble with the Regent:
‘Richt honourable Sir and Brother—I heard, the
day, the rigorous answer and refuse that ye 1568.
gat, whereof I was not weel apayit. But always
I pray you, as ye are set amids twa great inconvenients,
travel to eschew them baith. The ane is maist evident—to
wit, the remaining in your awn place where ye are; for by
the number of sick folk that gaes out of the town, the
muir is [li]able to be overspread; and it cannot be but,
through the nearness of your place and the indigence of
them that are put out, they sall continually repair about
your room, and through their conversation infect some of
your servants, whereby they sall precipitate yourself and
your children in maist extreme danger. And as I see ye
have foreseen the same for the young folk, whaise bluid is
in maist peril to be infectit first, and therefore purposes to
send them away to Menteith, where I wald wiss at God
that ye war yourself, without offence of authority, or of
your band, sae that your house get nae skaith. But yet,
sir, there is ane mid way whilk ye suld not omit, whilk is to
withdraw you frae that side of the town to some house
upon the north side of the samen; whereof ye may have
in borrowing, when ye sall have to do—to wit, the Gray
Crook, Innerleith’s self, Wairdie, or sic other places as ye
could choose within ane mile; whereinto I wald suppose
ye wald be in less danger than in Merchanston. And close
up your houses, your granges, your barns, and all, and
suffer nae man come therein, while [till] it please God to
put ane stay to this great plague; and in the meantime,
make you to live upon your penny, or on sic thing as
comes to you out of Lennox or Menteith;60 whilk gif ye do
not, I see ye will ruin yourself; and howbeit I escape in
this voyage,61 I will never look to see you again, whilk
were some mair regret to me than I will expreme by
writing. Always [I] beseeks you, as ye love your awn weal,
the weal of your house, and us your friends that wald you
weel, to tak sure order in this behalf; and, howbeit your
evil favourers wald cast you away, yet ye tak better keep
on yourself, and mak not them to rejoice, and us your
friends to mourn baith at ance. Whilk God forbid, and for
his goodness, preserve you and your posterity from sic
skaith, and maintein you in [his] holy keeping for ever. Of
Edinburgh, the 21st day of September 1568, by your
brother at power,
‘The Bishop of Orkney.’
The bishop speaks with unmistakable friendship for his brother-in-
law; but what he says and what he does not say of the miserables of
the Burgh-moor, tends much to confirm Dr Skeyne’s remarks on the
absence of Christian kindness among the upper classes towards the
afflicted poor on this occasion.
This pestilence, lasting till February, is said to have carried off 2500
persons in Edinburgh, which could not be much less than a tenth of
the population. From the double cause of the pest and the absence
of the Regent in England, there were ‘nae diets of Justiciary halden
frae the hinderend of August to the second day of March.’62 Such of
the inhabitants of the Canongate as were affected had to go out and
live in huts on the Hill (by which is probably meant Salisbury Crags),
and there stay till they were ‘clengit.’ A collection of money was
made among the other inhabitants for their support.63
The distresses of pestilence were preceded and
attended by those of a famine, which suffered a 1568.
great and sudden abatement in the month of
August 1569, perhaps in consequence of favourable appearances in
the crop then about to be gathered. At least, we are informed by the
Diurnal of Occurrents, that on that day, in the forenoon, ‘the boll of
ait meal was sauld for 3l. 12s., the boll of wheat for 4l. 10s., and the
boll of beare for 3l.; but ere twa afternoon upon the same day, the
boll of ait meal was sauld for 40s., 38s., and 36s., the boll of wheat
for 50s., and the beare for 33s.‘—D. O.64
Little doubt is now entertained that the exanthematous disease
called long ago the Pest, and now the Plague, and which has happily
been unknown in the British Islands for two centuries, was the
consequence of miasma arising from crowded and filthy living, acting
on bodies predisposed by deficient aliment and other causes, and
that at a certain stage it assumed a contagious character. It will be
found throughout the present work that the malady generally,
though not invariably, followed dearth and famine—a generalisation
harmonising with the observations of Professor Alison as to the
connection between destitution and typhus fever, and supporting the
views of those who hold that it is for the interest of the community
that all its members have a sufficiency of the necessaries of life. The
pest was not the only epidemic which afflicted our ancestors in
consequence of erroneous living and misery endured by great
multitudes of people. There was one called the land-ill or wame-ill,
which seems to have been of the nature of cholera. In an early
chronicle quoted below,65 is the following striking notice of this kind
of malady in connection with famine as occurring in 1439:—‘The
samen time there was in Scotland a great dearth, for the boll of
wheat was at 40s., and the boll of ait meal 30s.; and verily the
dearth was sae great that there died a passing [number of] people
for hunger. And als the land-ill, the wame-ill, was so violent, that
there died mae that year than ever there died, owther in pestilence,
or yet in ony other sickness in Scotland. And that samen year the
pestilence came in Scotland, and began at Dumfries, and it was callit
the Pestilence but Mercy, for there took it nane that ever recoverit,
but they died within twenty-four hours.’
At the time when the pest broke out in Edinburgh,
there lived in the city a young man of the middle Oct. 1568.
class, bearing the name of George Bannatyne, who
was somewhat addicted to the vain and unprofitable art of poesy. He
was acquainted with the writings of his predecessors, Dunbar,
Douglas, Henryson, Montgomery, Scott, and others, through the
manuscripts to which alone they had as yet been committed. It was
not then the custom to print literary productions unless for some
reason external to their literary character, and these poems,
therefore, were existing in the same peril of not being preserved to
posterity as the works of Ennius in the days of Augustus. In all
probability, the greater part of them, if not nearly the whole, would
have been lost, but for an accidental circumstance connected with
the plague now raging.

George Bannatyne’s Arms and Initials.


In that terrible time, when hundreds were dying in
1568.
the city, and apprehensions for their own safety
engrossed every mind, the young man George Bannatyne passed
into retirement, and for three months devoted himself to the task of
transcribing the fugitive productions of the Scottish muse into a fair
volume. His retreat is supposed to have been the old manor-house
of Newtyle, near the village of Meigle in Strathmore, and nothing
could be more likely, as this was the country-house of his father, who
seems to have been a prosperous lawyer in Edinburgh. In the short
space of time mentioned, George had copied in a good hand, from
the mutilated and obscure manuscripts he possessed, three hundred
and seventy-two poems, covering no less than eight hundred folio
pages; a labour by which he has secured the eternal gratitude of his
countrymen, and established for himself a fame granted to but few
for their own compositions. The volume—celebrated as the Bannatyne
Manuscript—still exists, under the greatest veneration, in the
Advocates’ Library, Edinburgh, after yielding from its ample stores
the materials of Ramsay’s, Hailes’s, and other printed selections.66
In this time of dearth and pestilence, the council of
the Canongate providently ordained that ‘the Nov. 18.
fourpenny loaf be weel baken and dried, gude and
sufficient stuff, and keep the measures and paik of twenty-two
ounces;’ ‘that nae browsters nor ony tapsters sell ony dearer ale nor
6d. the pint;’ and ‘that nae venters of wine buy nae new wine dearer
than that they may sell the same commonly to all our sovereign’s
lieges for 16d. the pint.’
They also ordained (January 10, 1568-9), that ‘nae maner of person
inhabiter within this burgh, venters of wine, hosters, or tapsters of
ale, nor others whatsomever, thole or permit ony maner of persons
to drink, keep company at table in common taverners’ houses, upon
Sunday, the time of preaching, under the pain of forty shillings, to be
upta’en of the man and wife wha aucht the said taverners’ houses
sae oft as they fails, but favour.’67
It is evident from this injunction, that the keeping of public-houses
open on Sundays, at times different from those during which there
was public worship, was not then forbidden.

You might also like